qb_loop_signal_add - Man Page

Add a signal job.


#include <qb/qbloop.h>

int32_t qb_loop_signal_add(
    qb_loop_t                  *l, /* pointer to the loop instance */
    enum qb_loop_priority       p, /* the priority */
    int32_t                     sig,  /* (SIGHUP or SIGINT) etc .... */
    void                       *data,   /* user data passed into the dispatch function */
    qb_loop_signal_dispatch_fn  dispatch_fn,          /* callback function */
    qb_loop_signal_handle      *handle     /* (out) a reference to the signal job */


l           pointer to the loop instance

p           the priority

sig         (SIGHUP or SIGINT) etc ....

data        user data passed into the dispatch function

dispatch_fn callback function

handle      (out) a reference to the signal job


Get a callback on this signal (not in the context of the signal).


enum qb_loop_priority {




Return Value

status (0 == ok, -errno == failure)

See Also

qb_loop_job_del(3), qb_loop_run(3), qb_loop_create(3), qb_loop_stop(3), qb_loop_poll_low_fds_event_set(3), qb_loop_signal_del(3), qb_loop_job_add(3), qb_loop_poll_del(3), qb_loop_destroy(3), qb_loop_timer_expire_time_remaining(3), qb_loop_poll_mod(3), qb_loop_signal_mod(3), qb_loop_timer_del(3), qb_loop_timer_add(3), qb_loop_timer_is_running(3), qb_loop_timer_expire_time_get(3), qb_loop_poll_add(3)

Referenced By

qb_loop_create(3), qb_loop_destroy(3), qbloop.h(3), qb_loop_job_add(3), qb_loop_job_del(3), qb_loop_poll_add(3), qb_loop_poll_del(3), qb_loop_poll_low_fds_event_set(3), qb_loop_poll_mod(3), qb_loop_run(3), qb_loop_signal_del(3), qb_loop_signal_mod(3), qb_loop_stop(3), qb_loop_timer_add(3), qb_loop_timer_del(3), qb_loop_timer_expire_time_get(3), qb_loop_timer_expire_time_remaining(3), qb_loop_timer_is_running(3).

2022-03-23 libqb Programmer's Manual