explain_poll_or_die(3)                                  explain_poll_or_die(3)



NNAAMMEE
       explain_poll_or_die - wait for some event on file descriptor and report
       errors

SSYYNNOOPPSSIISS
       #include <libexplain/poll.h>
       int explain_poll_or_die(struct pollfd *fds, int nfds, int timeout);
       int explain_poll_on_error(struct pollfd *fds, int nfds, int timeout);

DDEESSCCRRIIPPTTIIOONN
       The eexxppllaaiinn__ppoollll__oorr__ddiiee function is used to  call  the  _p_o_l_l(2)  system
       call.  On  failure  an  explanation will be printed to _s_t_d_e_r_r, obtained
       from the _e_x_p_l_a_i_n___p_o_l_l(3) function, and then the process  terminates  by
       calling exit(EXIT_FAILURE).

       The  eexxppllaaiinn__ppoollll__oonn__eerrrroorr  function is used to call the _p_o_l_l(2) system
       call. On failure an explanation will be  printed  to  _s_t_d_e_r_r,  obtained
       from the _e_x_p_l_a_i_n___p_o_l_l(3) function, but still returns to the caller.

       _f_d_s     The fds, exactly as to be passed to the _p_o_l_l(2) system call.

       _n_f_d_s    The nfds, exactly as to be passed to the _p_o_l_l(2) system call.

       _t_i_m_e_o_u_t The  timeout,  exactly  as  to  be passed to the _p_o_l_l(2) system
               call.

RREETTUURRNN VVAALLUUEE
       The eexxppllaaiinn__ppoollll__oorr__ddiiee function only returns on success,  see  _p_o_l_l(2)
       for  more  information. On failure, prints an explanation and exits, it
       does not return.

       The eexxppllaaiinn__ppoollll__oonn__eerrrroorr function always returns the value  return  by
       the wrapped _p_o_l_l(2) system call.

EEXXAAMMPPLLEE
       The  eexxppllaaiinn__ppoollll__oorr__ddiiee  function  is intended to be used in a fashion
       similar to the following example:
              int result = explain_poll_or_die(fds, nfds, timeout);

SSEEEE AALLSSOO
       _p_o_l_l(2) wait for some event on a file descriptor

       _e_x_p_l_a_i_n___p_o_l_l(3)
               explain _p_o_l_l(2) errors

       _e_x_i_t(2) terminate the calling process

CCOOPPYYRRIIGGHHTT
       libexplain version 1.4
       Copyright (C) 2010 Peter Miller



                                                        explain_poll_or_die(3)
