summaryrefslogtreecommitdiff
path: root/ace/Process.cpp
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1998-10-11 00:45:19 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1998-10-11 00:45:19 +0000
commita9bf571972ac2c5eee629ef061437f5a41090fde (patch)
tree1f09df5ac1ebfbf4309b5fb9751cb4bfb859f44d /ace/Process.cpp
parent9b71450b19be4d024fbfc9a90c2ab136e53002a1 (diff)
downloadATCD-a9bf571972ac2c5eee629ef061437f5a41090fde.tar.gz
.
Diffstat (limited to 'ace/Process.cpp')
-rw-r--r--ace/Process.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/ace/Process.cpp b/ace/Process.cpp
index 82b54091e8b..226bf1755c7 100644
--- a/ace/Process.cpp
+++ b/ace/Process.cpp
@@ -52,6 +52,33 @@ ACE_Process::spawn (ACE_Process_Options &options)
else
// CreateProcess failed.
return -1;
+#elif defined (CHORUS)
+ // This only works if we exec. Chorus does not really support
+ // forking
+ if (ACE_BIT_ENABLED (options.creation_flags (),
+ ACE_Process_Options::NO_EXEC))
+ ACE_NOTSUP_RETURN (-1);
+
+ // These are all currently unsupported.
+ if (options.get_stdin () != ACE_INVALID_HANDLE)
+ ACE_NOTSUP_RETURN (-1);
+ if (options.get_stdout () != ACE_INVALID_HANDLE)
+ ACE_NOTSUP_RETURN (-1);
+ if (options.get_stderr () != ACE_INVALID_HANDLE)
+ ACE_NOTSUP_RETURN (-1);
+ if (options.working_directory () != 0)
+ ACE_NOTSUP_RETURN (-1);
+
+ if (options.env_argv ()[0] == 0)
+ // command-line args
+ this->child_id_ = ACE_OS::execvp (options.command_line_argv ()[0],
+ options.command_line_argv ());
+ else
+ // Command-line args and environment variables
+ this->child_id_ = ACE_OS::execve (options.command_line_argv ()[0],
+ options.command_line_argv (),
+ options.env_argv ());
+ return this->child_id_;
#else /* ACE_WIN32 */
// Fork the new process.
this->child_id_ = ACE_OS::fork (options.command_line_argv ()[0]);