diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2008-10-23 20:07:50 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2008-10-23 20:07:50 +0000 |
commit | bb723d7616a8bb1105b29350f1f8962b3176c679 (patch) | |
tree | bfd79403a57d09fe537bde61e96d936f41f008f3 /ACE/ace/Process.cpp | |
parent | 18cd989bc0c1ea5510a3c4a744e4f336c9354780 (diff) | |
download | ATCD-bb723d7616a8bb1105b29350f1f8962b3176c679.tar.gz |
ChangeLogTag:Thu
Diffstat (limited to 'ACE/ace/Process.cpp')
-rw-r--r-- | ACE/ace/Process.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/ACE/ace/Process.cpp b/ACE/ace/Process.cpp index e46b7bf10ff..ff2b7986e66 100644 --- a/ACE/ace/Process.cpp +++ b/ACE/ace/Process.cpp @@ -455,14 +455,16 @@ ACE_Process::spawn (ACE_Process_Options &options) ACE_OS::close (options.get_stdin ()); ACE_OS::close (options.get_stdout ()); ACE_OS::close (options.get_stderr ()); - if (!options.handle_inheritence()) { - // Set close-on-exec for all FDs except standard handles - for (int i = ACE::max_handles () - 1; i >= 0; i--) { - if ((i == ACE_STDIN) || (i == ACE_STDOUT) || (i == ACE_STDERR)) - continue; - ACE_OS::fcntl (i, F_SETFD, FD_CLOEXEC); + if (!options.handle_inheritance ()) + { + // Set close-on-exec for all FDs except standard handles + for (int i = ACE::max_handles () - 1; i >= 0; i--) + { + if (i == ACE_STDIN || i == ACE_STDOUT || i == ACE_STDERR) + continue; + ACE_OS::fcntl (i, F_SETFD, FD_CLOEXEC); + } } - } // If we must, set the working directory for the child // process. |