EvChild::__constructConstructs the EvChild watcher object
&reftitle.description;
publicEvChild::__constructintpidbooltracecallablecallbackmixeddata&null;intpriority0
Constructs the EvChild watcher object.
Call the callback when a status change for process ID
pid(or any PID if
pid is 0) has been received(a
status change happens when the process terminates or is killed, or, when
trace is &true;, additionally when it is stopped or
continued). In other words, when the process receives a
SIGCHLD, Ev will fetch the
outstanding exit/wait status for all changed/zombie children and call the
callback.
It is valid to install a child watcher after an
EvChild has exited but before the event loop has
started its next iteration(for example, first you fork, then the new child
process might exit, and only then do you install an
EvChild watcher in the parent for the new
PID).
You can access both exit/tracing status and pid by
using the rstatus and rpid
properties of the watcher object.
You can have as many PID watchers per
PID as you want, they will all be called.
The EvChild::createStopped method doesn't
start(activate) the newly created watcher.
&reftitle.parameters;
pid
Wait for status changes of process PID(or any process if PID is specified
as 0).
trace
If &false;, only activate the watcher when the process terminates.
Otherwise(&true;) additionally activate the watcher when the process is
stopped or continued.
callback
See Watcher callbacks.
data
Custom data associated with the watcher.
priority
Watcher priority
&reftitle.returnvalues;
Returns EvChild object on success.
&reftitle.seealso;
EvLoop::child