1explain_signalfd_or_die(3) Library Functions Manual explain_signalfd_or_die(3)
2
3
4
6 explain_signalfd_or_die - create signalable file descriptor and report
7 errors
8
10 #include <libexplain/signalfd.h>
11 int explain_signalfd_or_die(int fildes, const sigset_t *mask, int
12 flags);
13 int explain_signalfd_on_error(int fildes, const sigset_t *mask, int
14 flags);
15
17 The explain_signalfd_or_die function is used to call the signalfd(2)
18 system call. On failure an explanation will be printed to stderr,
19 obtained from the explain_signalfd(3) function, and then the process
20 terminates by calling exit(EXIT_FAILURE).
21
22 The explain_signalfd_on_error function is used to call the signalfd(2)
23 system call. On failure an explanation will be printed to stderr,
24 obtained from the explain_signalfd(3) function, but still returns to
25 the caller.
26
27 fildes The fildes, exactly as to be passed to the signalfd(2) system
28 call.
29
30 mask The mask, exactly as to be passed to the signalfd(2) system
31 call.
32
33 flags The flags, exactly as to be passed to the signalfd(2) system
34 call.
35
37 The explain_signalfd_or_die function only returns on success, see sig‐
38 nalfd(2) for more information. On failure, prints an explanation and
39 exits, it does not return.
40
41 The explain_signalfd_on_error function always returns the value return
42 by the wrapped signalfd(2) system call.
43
45 The explain_signalfd_or_die function is intended to be used in a fash‐
46 ion similar to the following example:
47 int result = explain_signalfd_or_die(fildes, mask, flags);
48
50 signalfd(2)
51 create a file descriptor for accepting signals
52
53 explain_signalfd(3)
54 explain signalfd(2) errors
55
56 exit(2) terminate the calling process
57
59 libexplain version 0.40
60 Copyright (C) 2009 Peter Miller
61
62
63
64 explain_signalfd_or_die(3)