1explain_select_or_die(3) Library Functions Manual explain_select_or_die(3)
2
3
4
6 explain_select_or_die - blah blah and report errors
7
9 #include <libexplain/select.h>
10 void explain_select_or_die(int nfds, fd_set *readfds, fd_set *writefds,
11 fd_set *exceptfds, struct timeval *timeout);
12
14 The explain_select_or_die function is used to call the select(2) system
15 call. On failure an explanation will be printed to stderr, obtained
16 from explain_select(3), and then the process terminates by calling
17 exit(EXIT_FAILURE).
18
19 This function is intended to be used in a fashion similar to the fol‐
20 lowing example:
21 explain_select_or_die(nfds, readfds, writefds, exceptfds, timeout);
22
23 nfds The nfds, exactly as to be passed to the select(2) system call.
24
25 readfds The readfds, exactly as to be passed to the select(2) system
26 call.
27
28 writefds
29 The writefds, exactly as to be passed to the select(2) system
30 call.
31
32 exceptfds
33 The exceptfds, exactly as to be passed to the select(2) system
34 call.
35
36 timeout The timeout, exactly as to be passed to the select(2) system
37 call.
38
39 Returns:
40 This function only returns on success. On failure, prints an
41 explanation and exits.
42
44 select(2)
45 blah blah
46
47 explain_select(3)
48 explain select(2) errors
49
50 exit(2) terminate the calling process
51
53 libexplain version 1.4
54 Copyright (C) 2008 Peter Miller
55
56
57
58 explain_select_or_die(3)