diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 9 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 9 | ||||
-rw-r--r-- | ace/Process.cpp | 14 | ||||
-rw-r--r-- | ace/Process.h | 3 |
5 files changed, 41 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index 2e4c00d0e15..d8e3efed97f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Wed Feb 20 14:18:14 2002 Phil Mesnier <mesnier_p@ociweb.com> + + * ace/Process.cpp: + * ace/Process.h: Added a new method + ACE_Process_Options::release_handles() to fix the trouble of using + a pipe as stdout, where the pipe closes completely when the child + terminates. This method replaces some functionality in the Process + Options destructor. + Wed Feb 20 13:01:25 2002 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu> * ace/Atomic_Op.i: Fix the return value of the ACE_GUARD_RETURN diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index 2e4c00d0e15..d8e3efed97f 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,12 @@ +Wed Feb 20 14:18:14 2002 Phil Mesnier <mesnier_p@ociweb.com> + + * ace/Process.cpp: + * ace/Process.h: Added a new method + ACE_Process_Options::release_handles() to fix the trouble of using + a pipe as stdout, where the pipe closes completely when the child + terminates. This method replaces some functionality in the Process + Options destructor. + Wed Feb 20 13:01:25 2002 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu> * ace/Atomic_Op.i: Fix the return value of the ACE_GUARD_RETURN diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 2e4c00d0e15..d8e3efed97f 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,12 @@ +Wed Feb 20 14:18:14 2002 Phil Mesnier <mesnier_p@ociweb.com> + + * ace/Process.cpp: + * ace/Process.h: Added a new method + ACE_Process_Options::release_handles() to fix the trouble of using + a pipe as stdout, where the pipe closes completely when the child + terminates. This method replaces some functionality in the Process + Options destructor. + Wed Feb 20 13:01:25 2002 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu> * ace/Atomic_Op.i: Fix the return value of the ACE_GUARD_RETURN diff --git a/ace/Process.cpp b/ace/Process.cpp index 147647ee343..bff62bef0a6 100644 --- a/ace/Process.cpp +++ b/ace/Process.cpp @@ -703,11 +703,11 @@ ACE_Process_Options::set_handles (ACE_HANDLE std_in, return 0; // Success. } -#endif /* !ACE_HAS_WINCE */ -ACE_Process_Options::~ACE_Process_Options (void) + +void +ACE_Process_Options::release_handles () { -#if !defined (ACE_HAS_WINCE) if (set_handles_called_) { #if defined (ACE_WIN32) @@ -721,6 +721,14 @@ ACE_Process_Options::~ACE_Process_Options (void) #endif /* ACE_WIN32 */ set_handles_called_ = 0; } +} +#endif /* !ACE_HAS_WINCE */ + + +ACE_Process_Options::~ACE_Process_Options (void) +{ +#if !defined (ACE_HAS_WINCE) + release_handles(); delete [] environment_buf_; delete [] environment_argv_; #endif /* !ACE_HAS_WINCE */ diff --git a/ace/Process.h b/ace/Process.h index b49f81a9d1b..36169594466 100644 --- a/ace/Process.h +++ b/ace/Process.h @@ -92,6 +92,9 @@ public: ACE_HANDLE std_out = ACE_INVALID_HANDLE, ACE_HANDLE std_err = ACE_INVALID_HANDLE); + /// release the standard handles previously set with set_handles; + void release_handles (void); + /// <format> must be of the form "VARIABLE=VALUE". There can not be /// any spaces between VARIABLE and the equal sign. int setenv (const ACE_TCHAR *format, |