src/signals.h
changeset 71 0a13030f795d
parent 70 a9a4c5e6aa30
equal deleted inserted replaced
70:a9a4c5e6aa30 71:0a13030f795d
    34  *
    34  *
    35  * Returns NULL on failure
    35  * Returns NULL on failure
    36  */
    36  */
    37 err_t signals_create (struct signals **signals_ptr, struct event_base *ev_base);
    37 err_t signals_create (struct signals **signals_ptr, struct event_base *ev_base);
    38 
    38 
    39 /*
    39 /**
    40  * Add a signal to be handled by the given signals struct with the given handler.
    40  * Add a signal to be handled by the given signals struct with the given handler.
    41  */
    41  */
    42 err_t signals_add (struct signals *signals, int sigval, void (*sig_handler)(evutil_socket_t, short, void *), void *arg);
    42 err_t signals_add (struct signals *signals, int sigval, void (*sig_handler)(evutil_socket_t, short, void *), void *arg);
    43 
    43 
    44 /*
    44 /**
       
    45  * Ignore the given sigval.
       
    46  */
       
    47 err_t signal_ignore (int signum, struct error_info *err);
       
    48 
       
    49 /**
    45  * Add a set of default signals
    50  * Add a set of default signals
    46  *      SIGPIPE     signals_ignore
    51  *      SIGPIPE     signals_ignore
    47  *      SIGINT      signals_loopexit
    52  *      SIGINT      signals_loopexit
    48  */
    53  */
    49 struct signals *signals_default (struct event_base *ev_base);
    54 struct signals *signals_default (struct event_base *ev_base);
    50 
    55 
    51 /*
    56 /**
    52  * Free the resources/handlers associated with the given signal handler set
    57  * Free the resources/handlers associated with the given signal handler set
    53  */
    58  */
    54 void signals_free (struct signals *signals);
    59 void signals_free (struct signals *signals);
    55 
    60 
    56 #endif /* LIB_SIGNAL_H */
    61 #endif /* SIGNALS_H */