diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2000-06-15 19:51:43 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2000-06-15 19:51:43 +0000 |
commit | bdc797b98cabb5950e306cc60daeea081d8f9838 (patch) | |
tree | 56f08329868c254c8d868fab84343dc95d62bc42 /ace/Process_Manager.cpp | |
parent | 2e1a154440bf7c6a6ce4546acb2155a26842fcc2 (diff) | |
download | ATCD-bdc797b98cabb5950e306cc60daeea081d8f9838.tar.gz |
ChangeLogTag:Thu Jun 15 12:49:50 2000 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'ace/Process_Manager.cpp')
-rw-r--r-- | ace/Process_Manager.cpp | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/ace/Process_Manager.cpp b/ace/Process_Manager.cpp index 32804e2ca96..a50b98fd8b9 100644 --- a/ace/Process_Manager.cpp +++ b/ace/Process_Manager.cpp @@ -415,17 +415,15 @@ ACE_Process_Manager::register_handler (ACE_Event_Handler *eh, if (i == -1) // set "process not found" error return -1; - else - { - ACE_Process_Descriptor &proc_desc = this->process_table_[i]; - if (proc_desc.exit_notify_ != 0) - proc_desc.exit_notify_->handle_close - (ACE_INVALID_HANDLE, - 0); - proc_desc.exit_notify_ = eh; - return 0; - } + ACE_Process_Descriptor &proc_desc = this->process_table_[i]; + + if (proc_desc.exit_notify_ != 0) + proc_desc.exit_notify_->handle_close + (ACE_INVALID_HANDLE, + 0); + proc_desc.exit_notify_ = eh; + return 0; } int @@ -473,17 +471,15 @@ ACE_Process_Manager::spawn (ACE_Process *process, if (pid == ACE_INVALID_PID || pid == 0) return pid; - else - { - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, - ace_mon, this->lock_, -1)); - if (this->append_proc (process) == -1) - // bad news: spawned, but not registered in table. - return ACE_INVALID_PID; - else - return pid; - } + ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, + ace_mon, this->lock_, -1)); + + if (this->append_proc (process) == -1) + // bad news: spawned, but not registered in table. + return ACE_INVALID_PID; + + return pid; } // Create N new processs. @@ -582,9 +578,9 @@ ACE_Process_Manager::remove (pid_t pid) if (i != -1) return this->remove_proc (i); - else - // set "process not found" error - return -1; + + // set "process not found" error + return -1; } // Remove a process from the pool. Must be called with locks held. |