Util
- Closed dangling pipes in execute (), resolving problems when a hook script forks.
This commit is contained in:
committed by
Paul Beckingham
parent
3484e44c7d
commit
af772f4c49
@@ -299,9 +299,11 @@ int execute (
|
||||
|
||||
if (dup2 (pin[0], STDIN_FILENO) == -1)
|
||||
throw std::string (std::strerror (errno));
|
||||
close (pin[0]);
|
||||
|
||||
if (dup2 (pout[1], STDOUT_FILENO) == -1)
|
||||
throw std::string (std::strerror (errno));
|
||||
close (pout[1]);
|
||||
|
||||
char** argv = new char* [args.size () + 2];
|
||||
argv[0] = (char*) executable.c_str ();
|
||||
|
||||
Reference in New Issue
Block a user