1explain_setpriority_or_die(3L)ibrary Functions Manuaelxplain_setpriority_or_die(3)
2
3
4
6 explain_setpriority_or_die - set program scheduling priority and report
7 errors
8
10 #include <libexplain/setpriority.h>
11 void explain_setpriority_or_die(int which, int who, int prio);
12 int explain_setpriority_on_error(int which, int who, int prio);
13
15 The explain_setpriority_or_die function is used to call the setprior‐
16 ity(2) system call. On failure an explanation will be printed to
17 stderr, obtained from the explain_setpriority(3) function, and then the
18 process terminates by calling exit(EXIT_FAILURE).
19
20 The explain_setpriority_on_error function is used to call the setprior‐
21 ity(2) system call. On failure an explanation will be printed to
22 stderr, obtained from the explain_setpriority(3) function, but still
23 returns to the caller.
24
25 which The which, exactly as to be passed to the setpriority(2) system
26 call.
27
28 who The who, exactly as to be passed to the setpriority(2) system
29 call.
30
31 prio The prio, exactly as to be passed to the setpriority(2) system
32 call.
33
35 The explain_setpriority_or_die function only returns on success, see
36 setpriority(2) for more information. On failure, prints an explanation
37 and exits, it does not return.
38
39 The explain_setpriority_on_error function always returns the value
40 return by the wrapped setpriority(2) system call.
41
43 The explain_setpriority_or_die function is intended to be used in a
44 fashion similar to the following example:
45 explain_setpriority_or_die(which, who, prio);
46
48 setpriority(2)
49 set program scheduling priority
50
51 explain_setpriority(3)
52 explain setpriority(2) errors
53
54 exit(2) terminate the calling process
55
57 libexplain version 1.4
58 Copyright (C) 2013 Peter Miller
59
60
61
62 explain_setpriority_or_die(3)