1TICKIT_WATCH_PROCESS(3)    Library Functions Manual    TICKIT_WATCH_PROCESS(3)
2
3
4

NAME

6       tickit_watch_process  -  invoke  a callback when a child process termi‐
7       nates
8

SYNOPSIS

10       #include <tickit.h>
11
12       typedef struct {
13         pid_t pid;
14         int wstatus;
15       } TickitProcessWatchInfo;
16
17       typedef int TickitCallbackFn(Tickit *t, TickitEventflags flags,
18           void *info, void *user);
19
20       void *tickit_watch_process(Tickit *t, pid_t pid, TickitBindFlags flags,
21           TickitCallbackFn *fn, void *user);
22
23       Link with -ltickit.
24

DESCRIPTION

26       tickit_watch_process() registers a callback function to be  invoked  by
27       the  toplevel  event loop when a child process terminates. A registered
28       callback will be invoked by a running call to tickit_run(3).  The  info
29       pointer  will  point to a structure containing the process PID and exit
30       status.
31
32       If registered with the TICKIT_BIND_FIRST flag, the callback will be in‐
33       serted  at  the start of the queue, coming before others. If not, it is
34       appended at the end.
35
36       If cancelled by tickit_watch_cancel(3) the callback function is invoked
37       with  just  the  TICKIT_EV_UNBIND  flag  if it had been registered with
38       TICKIT_BIND_UNBIND.
39

RETURN VALUE

41       tickit_watch_process() returns an opaque identifier pointer.
42

SEE ALSO

44       tickit_new_stdio(3),     tickit_watch_io(3),     tickit_watch_timer_af‐
45       ter_msec(3),   tickit_watch_timer_at_epoch(3),   tickit_watch_later(3),
46       tickit_watch_signal(3), tickit_watch_cancel(3), tickit(7)
47
48
49
50                                                       TICKIT_WATCH_PROCESS(3)
Impressum