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

NAME

6       explain_poll_or_die - wait for some event on file descriptor and report
7       errors
8

SYNOPSIS

10       #include <libexplain/poll.h>
11       int explain_poll_or_die(struct pollfd *fds, int nfds, int timeout);
12       int explain_poll_on_error(struct pollfd *fds, int nfds, int timeout);
13

DESCRIPTION

15       The explain_poll_or_die function is used to  call  the  poll(2)  system
16       call.  On  failure  an  explanation will be printed to stderr, obtained
17       from the explain_poll(3) function, and then the process  terminates  by
18       calling exit(EXIT_FAILURE).
19
20       The  explain_poll_on_error  function is used to call the poll(2) system
21       call. On failure an explanation will be  printed  to  stderr,  obtained
22       from the explain_poll(3) function, but still returns to the caller.
23
24       fds     The fds, exactly as to be passed to the poll(2) system call.
25
26       nfds    The nfds, exactly as to be passed to the poll(2) system call.
27
28       timeout The  timeout,  exactly  as  to  be passed to the poll(2) system
29               call.
30

RETURN VALUE

32       The explain_poll_or_die function only returns on success,  see  poll(2)
33       for  more  information. On failure, prints an explanation and exits, it
34       does not return.
35
36       The explain_poll_on_error function always returns the value  return  by
37       the wrapped poll(2) system call.
38

EXAMPLE

40       The  explain_poll_or_die  function  is intended to be used in a fashion
41       similar to the following example:
42              int result = explain_poll_or_die(fds, nfds, timeout);
43

SEE ALSO

45       poll(2) wait for some event on a file descriptor
46
47       explain_poll(3)
48               explain poll(2) errors
49
50       exit(2) terminate the calling process
51
53       libexplain version 0.40
54       Copyright (C) 2010 Peter Miller
55
56
57
58                                                        explain_poll_or_die(3)
Impressum