summaryrefslogtreecommitdiff
path: root/ace/Process.cpp
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-14 21:45:25 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-14 21:45:25 +0000
commitcd9025aff162b2676809b5ece10090dd45a86cca (patch)
tree1aaf6e0310ff60f8ea1a668a7bfaa85d9fe5f3b6 /ace/Process.cpp
parent23685523d29228cb3baab5b17a665d005b474eca (diff)
downloadATCD-cd9025aff162b2676809b5ece10090dd45a86cca.tar.gz
(spawn): added an ACE_DEBUG printout before each call to ACE_OS::exit ()
Diffstat (limited to 'ace/Process.cpp')
-rw-r--r--ace/Process.cpp26
1 files changed, 21 insertions, 5 deletions
diff --git a/ace/Process.cpp b/ace/Process.cpp
index 63259431608..67095654e82 100644
--- a/ace/Process.cpp
+++ b/ace/Process.cpp
@@ -68,13 +68,25 @@ ACE_Process::spawn (ACE_Process_Options &options)
{
if (options.get_stdin () != ACE_INVALID_HANDLE
&& ACE_OS::dup2 (options.get_stdin (), ACE_STDIN) == -1)
- ACE_OS::exit (errno);
+ {
+ ACE_DEBUG ((LM_MAX,
+ "(%P): ace/Process.cpp; unable to open stdin; exiting!!!!\n"));
+ ACE_OS::exit (errno);
+ }
else if (options.get_stdout () != ACE_INVALID_HANDLE
&& ACE_OS::dup2 (options.get_stdout (), ACE_STDOUT) == -1)
- ACE_OS::exit (errno);
+ {
+ ACE_DEBUG ((LM_MAX,
+ "(%P): ace/Process.cpp; unable to open stdout; exiting!!!!\n"));
+ ACE_OS::exit (errno);
+ }
else if (options.get_stderr () != ACE_INVALID_HANDLE
&& ACE_OS::dup2 (options.get_stderr (), ACE_STDERR) == -1)
- ACE_OS::exit (errno);
+ {
+ ACE_DEBUG ((LM_MAX,
+ "(%P): ace/Process.cpp; unable to open stderr; exiting!!!!\n"));
+ ACE_OS::exit (errno);
+ }
// close down unneeded descriptors
ACE_OS::close (options.get_stdin ());
@@ -108,8 +120,12 @@ ACE_Process::spawn (ACE_Process_Options &options)
}
if (result == -1)
- // If the execv fails, this child needs to exit.
- ACE_OS::exit (errno);
+ {
+ // If the execv fails, this child needs to exit.
+ ACE_DEBUG ((LM_MAX,
+ "(%P): ace/Process.cpp; exec failed: exiting!!!!\n"));
+ ACE_OS::exit (errno);
+ }
return 0;
}