… | |
… | |
1438 | |
1438 | |
1439 | =head3 Watcher-Specific Functions and Data Members |
1439 | =head3 Watcher-Specific Functions and Data Members |
1440 | |
1440 | |
1441 | =over 4 |
1441 | =over 4 |
1442 | |
1442 | |
1443 | =item ev_child_init (ev_child *, callback, int pid) |
1443 | =item ev_child_init (ev_child *, callback, int pid, int trace) |
1444 | |
1444 | |
1445 | =item ev_child_set (ev_child *, int pid) |
1445 | =item ev_child_set (ev_child *, int pid, int trace) |
1446 | |
1446 | |
1447 | Configures the watcher to wait for status changes of process C<pid> (or |
1447 | Configures the watcher to wait for status changes of process C<pid> (or |
1448 | I<any> process if C<pid> is specified as C<0>). The callback can look |
1448 | I<any> process if C<pid> is specified as C<0>). The callback can look |
1449 | at the C<rstatus> member of the C<ev_child> watcher structure to see |
1449 | at the C<rstatus> member of the C<ev_child> watcher structure to see |
1450 | the status word (use the macros from C<sys/wait.h> and see your systems |
1450 | the status word (use the macros from C<sys/wait.h> and see your systems |
1451 | C<waitpid> documentation). The C<rpid> member contains the pid of the |
1451 | C<waitpid> documentation). The C<rpid> member contains the pid of the |
1452 | process causing the status change. |
1452 | process causing the status change. C<trace> must be either C<0> (only |
|
|
1453 | activate the watcher when the process terminates) or C<1> (additionally |
|
|
1454 | activate the watcher when the process is stopped or continued). |
1453 | |
1455 | |
1454 | =item int pid [read-only] |
1456 | =item int pid [read-only] |
1455 | |
1457 | |
1456 | The process id this watcher watches out for, or C<0>, meaning any process id. |
1458 | The process id this watcher watches out for, or C<0>, meaning any process id. |
1457 | |
1459 | |