- Closed dangling pipes in execute (), resolving problems when a hook script
  forks.
This commit is contained in:
Wilhelm Schuermann 2015-02-22 19:53:31 +01:00 committed by Paul Beckingham
parent 3484e44c7d
commit af772f4c49

View file

@ -299,9 +299,11 @@ int execute (
if (dup2 (pin[0], STDIN_FILENO) == -1) if (dup2 (pin[0], STDIN_FILENO) == -1)
throw std::string (std::strerror (errno)); throw std::string (std::strerror (errno));
close (pin[0]);
if (dup2 (pout[1], STDOUT_FILENO) == -1) if (dup2 (pout[1], STDOUT_FILENO) == -1)
throw std::string (std::strerror (errno)); throw std::string (std::strerror (errno));
close (pout[1]);
char** argv = new char* [args.size () + 2]; char** argv = new char* [args.size () + 2];
argv[0] = (char*) executable.c_str (); argv[0] = (char*) executable.c_str ();