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

NAME

6       tickit_watch_signal - invoke a callback when a POSIX signal is raised
7

SYNOPSIS

9       #include <tickit.h>
10
11       typedef int TickitCallbackFn(Tickit *t, TickitEventflags flags,
12           void *info, void *user);
13
14       void *tickit_watch_signal(Tickit *t, int signum, TickitBindFlags flags,
15           TickitCallbackFn *fn, void *user);
16
17       Link with -ltickit.
18

DESCRIPTION

20       tickit_watch_signal()  registers  a  callback function to be invoked by
21       the toplevel event loop when a POSIX signal is received by the process.
22       A   registered   callback   will  be  invoked  by  a  running  call  to
23       tickit_run(3). The callback function may be invoked more than once,  if
24       the signal is received multiple times. The info pointer will be NULL.
25
26       Multiple  registrations  may  be  made for the same signal number; when
27       that signal is received all of them will be invoked in the  order  they
28       exist  in the queue. If registered with the TICKIT_BIND_FIRST flag, the
29       callback will be inserted at the start of the queue, coming before oth‐
30       ers. If not, it is appended at the end.
31
32       If cancelled by tickit_watch_cancel(3) the callback function is invoked
33       with just the TICKIT_EV_UNBIND flag if  it  had  been  registered  with
34       TICKIT_BIND_UNBIND.
35

RETURN VALUE

37       tickit_watch_signal() returns an opaque identifier pointer.
38

SEE ALSO

40       tickit_new_stdio(3),     tickit_watch_io(3),     tickit_watch_timer_af‐
41       ter_msec(3),   tickit_watch_timer_at_epoch(3),   tickit_watch_later(3),
42       tickit_watch_process(3), tickit_watch_cancel(3), tickit(7)
43
44
45
46                                                        TICKIT_WATCH_SIGNAL(3)
Impressum