logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

tickit_watch_process - invoke a callback when a child process terminates

Description

tickit_watch_process()  registers  a  callback  function  to be invoked by the toplevel event loop when a
       child process terminates. A registered callback will be invoked by a running call to  tickit_run(3).  The
       info pointer will point to a structure containing the process PID and exit status.

       If  registered  with the TICKIT_BIND_FIRST flag, the callback will be inserted at the start of the queue,
       coming before others. If not, it is appended at the end.

       If cancelled by tickit_watch_cancel(3) the callback function is invoked with  just  the  TICKIT_EV_UNBIND
       flag if it had been registered with TICKIT_BIND_UNBIND.

Name

       tickit_watch_process - invoke a callback when a child process terminates

Return Value

tickit_watch_process() returns an opaque identifier pointer.

See Also

tickit_new_stdio(3),                 tickit_watch_io(3),                tickit_watch_timer_after_msec(3),
       tickit_watch_timer_at_epoch(3),  tickit_watch_later(3),  tickit_watch_signal(3),  tickit_watch_cancel(3),
       tickit(7)

                                                                                         TICKIT_WATCH_PROCESS(3)

Synopsis

#include<tickit.h>typedefstruct{pid_tpid;intwstatus;}TickitProcessWatchInfo;typedefintTickitCallbackFn(Tickit*t,TickitEventflagsflags,void*info,void*user);void*tickit_watch_process(Tickit*t,pid_tpid,TickitBindFlagsflags,TickitCallbackFn*fn,void*user);

       Link with -ltickit.

See Also