summaryrefslogtreecommitdiff
path: root/ACE/ace/Process_Manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/ace/Process_Manager.cpp')
-rw-r--r--ACE/ace/Process_Manager.cpp32
1 files changed, 5 insertions, 27 deletions
diff --git a/ACE/ace/Process_Manager.cpp b/ACE/ace/Process_Manager.cpp
index f50b5584c68..e5d30024f14 100644
--- a/ACE/ace/Process_Manager.cpp
+++ b/ACE/ace/Process_Manager.cpp
@@ -53,7 +53,7 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Process_Manager)
// Singleton instance.
ACE_Process_Manager *ACE_Process_Manager::instance_ = 0;
-// Controls whether the <Process_Manager> is deleted when we shut down
+// Controls whether the Process_Manager is deleted when we shut down
// (we can only delete it safely if we created it!)
bool ACE_Process_Manager::delete_instance_ = false;
@@ -219,7 +219,6 @@ ACE_Process_Manager::resize (size_t size)
}
// Create and initialize the table to keep track of the process pool.
-
int
ACE_Process_Manager::open (size_t size, ACE_Reactor *r)
{
@@ -243,7 +242,6 @@ ACE_Process_Manager::open (size_t size, ACE_Reactor *r)
}
// Initialize the synchronization variables.
-
ACE_Process_Manager::ACE_Process_Manager (size_t size,
ACE_Reactor *r)
: ACE_Event_Handler (),
@@ -266,7 +264,6 @@ ACE_Process_Manager::ACE_Process_Manager (size_t size,
}
// Close up and release all resources.
-
int
ACE_Process_Manager::close (void)
{
@@ -313,7 +310,6 @@ ACE_Process_Manager::~ACE_Process_Manager (void)
// routine, which fooled the Reactor into thinking that this routine
// needed to be called. Since we don't know which Process exited, we
// must reap as many exit statuses as are immediately available.
-
int
ACE_Process_Manager::handle_input (ACE_HANDLE)
{
@@ -322,8 +318,7 @@ ACE_Process_Manager::handle_input (ACE_HANDLE)
pid_t pid;
do
- pid = this->wait (0,
- ACE_Time_Value::zero);
+ pid = this->wait (0, ACE_Time_Value::zero);
while (pid != 0 && pid != ACE_INVALID_PID);
return 0;
@@ -351,7 +346,6 @@ ACE_Process_Manager::handle_close (ACE_HANDLE /* handle */,
//
// On Win32, this routine is called synchronously, and is passed the
// HANDLE of the Process that exited, so we can do all our work here.
-
int
ACE_Process_Manager::handle_signal (int,
siginfo_t *si,
@@ -431,7 +425,6 @@ ACE_Process_Manager::register_handler (ACE_Event_Handler *eh,
}
// Create a new process.
-
pid_t
ACE_Process_Manager::spawn (ACE_Process_Options &options,
ACE_Event_Handler *event_handler)
@@ -449,7 +442,6 @@ ACE_Process_Manager::spawn (ACE_Process_Options &options,
}
// Create a new process.
-
pid_t
ACE_Process_Manager::spawn (ACE_Process *process,
ACE_Process_Options &options,
@@ -474,7 +466,6 @@ ACE_Process_Manager::spawn (ACE_Process *process,
}
// Create N new processs.
-
int
ACE_Process_Manager::spawn_n (size_t n,
ACE_Process_Options &options,
@@ -506,7 +497,6 @@ ACE_Process_Manager::spawn_n (size_t n,
// Append a process into the pool (does not check for duplicates).
// Must be called with locks held.
-
int
ACE_Process_Manager::append_proc (ACE_Process *proc,
ACE_Event_Handler *event_handler)
@@ -545,7 +535,6 @@ ACE_Process_Manager::append_proc (ACE_Process *proc,
// Insert a process into the pool (checks for duplicates and doesn't
// allow them to be inserted twice).
-
int
ACE_Process_Manager::insert_proc (ACE_Process *proc,
ACE_Event_Handler *event_handler)
@@ -561,7 +550,6 @@ ACE_Process_Manager::insert_proc (ACE_Process *proc,
}
// Remove a process from the pool.
-
int
ACE_Process_Manager::remove (pid_t pid)
{
@@ -579,7 +567,6 @@ ACE_Process_Manager::remove (pid_t pid)
}
// Remove a process from the pool. Must be called with locks held.
-
int
ACE_Process_Manager::remove_proc (size_t i)
{
@@ -654,7 +641,6 @@ ACE_Process_Manager::terminate (pid_t pid, int sig)
return ACE_OS::kill (pid, sig);
}
-
int
ACE_Process_Manager::set_scheduler (const ACE_Sched_Params & params,
pid_t pid)
@@ -694,7 +680,6 @@ ACE_Process_Manager::set_scheduler_all (const ACE_Sched_Params & params)
// Locate the index in the table associated with <pid>. Must be
// called with the lock held.
-
ssize_t
ACE_Process_Manager::find_proc (pid_t pid)
{
@@ -714,7 +699,6 @@ ACE_Process_Manager::find_proc (pid_t pid)
#if defined (ACE_WIN32)
// Locate the index in the table associated with <h>. Must be
// called with the lock held.
-
ssize_t
ACE_Process_Manager::find_proc (ACE_HANDLE h)
{
@@ -732,9 +716,8 @@ ACE_Process_Manager::find_proc (ACE_HANDLE h)
}
#endif /* ACE_WIN32 */
-// Wait for all the Processs to exit, or until <timeout> elapses.
+// Wait for all the Processs to exit, or until @a timeout elapses.
// Returns the number of Processes remaining, or -1 on an error.
-
int
ACE_Process_Manager::wait (const ACE_Time_Value &timeout)
{
@@ -773,7 +756,6 @@ ACE_Process_Manager::wait (const ACE_Time_Value &timeout)
// near as possible -- on Unix, we might accidentally get some other
// Process_Manager's Process, or an unmanaged Process, or a child
// process started by some other means.
-
pid_t
ACE_Process_Manager::wait (pid_t pid,
ACE_exitcode *status)
@@ -785,10 +767,9 @@ ACE_Process_Manager::wait (pid_t pid,
status);
}
-// Collect a single child processes' exit status, unless <timeout>
+// Collect a single child processes' exit status, unless @a timeout
// elapses before the process exits. Same caveats about accidental
// Process reaping on Unix as above.
-
pid_t
ACE_Process_Manager::wait (pid_t pid,
const ACE_Time_Value &timeout,
@@ -985,7 +966,6 @@ ACE_Process_Manager::wait (pid_t pid,
// Notify either the process-specific handler or the generic handler.
// If process-specific, call handle_close on the handler. Returns 1
// if process found, 0 if not. Must be called with locks held.
-
int
ACE_Process_Manager::notify_proc_handler (size_t i,
ACE_exitcode exit_code)
@@ -1002,9 +982,7 @@ ACE_Process_Manager::notify_proc_handler (size_t i,
else if (this->default_exit_handler_ != 0
&& this->default_exit_handler_->handle_exit (proc_desc.process_) < 0)
{
- this->default_exit_handler_->handle_close
- (ACE_INVALID_HANDLE,
- 0);
+ this->default_exit_handler_->handle_close (ACE_INVALID_HANDLE, 0);
this->default_exit_handler_ = 0;
}
return 1;