1SCHED_GETSCHEDULER(3P)     POSIX Programmer's Manual    SCHED_GETSCHEDULER(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       sched_getscheduler — get scheduling policy (REALTIME)
14

SYNOPSIS

16       #include <sched.h>
17
18       int sched_getscheduler(pid_t pid);
19

DESCRIPTION

21       The sched_getscheduler() function shall return the scheduling policy of
22       the  process  specified  by  pid.  If the value of pid is negative, the
23       behavior of the sched_getscheduler() function is unspecified.
24
25       The values that can be returned by sched_getscheduler() are defined  in
26       the <sched.h> header.
27
28       If  a  process  specified by pid exists, and if the calling process has
29       permission, the scheduling policy shall be  returned  for  the  process
30       whose process ID is equal to pid.
31
32       If pid is zero, the scheduling policy shall be returned for the calling
33       process.
34

RETURN VALUE

36       Upon successful completion,  the  sched_getscheduler()  function  shall
37       return  the  scheduling policy of the specified process.  If unsuccess‐
38       ful, the function shall return −1 and set errno to indicate the error.
39

ERRORS

41       The sched_getscheduler() function shall fail if:
42
43       EPERM  The requesting process does not have permission to determine the
44              scheduling policy of the specified process.
45
46       ESRCH  No process can be found corresponding to that specified by pid.
47
48       The following sections are informative.
49

EXAMPLES

51       None.
52

APPLICATION USAGE

54       None.
55

RATIONALE

57       None.
58

FUTURE DIRECTIONS

60       None.
61

SEE ALSO

63       sched_getparam(), sched_setparam(), sched_setscheduler()
64
65       The Base Definitions volume of POSIX.1‐2008, <sched.h>
66
68       Portions  of  this text are reprinted and reproduced in electronic form
69       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
70       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
71       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
72       cal  and  Electronics  Engineers,  Inc  and  The  Open Group.  (This is
73       POSIX.1-2008 with the 2013 Technical Corrigendum  1  applied.)  In  the
74       event of any discrepancy between this version and the original IEEE and
75       The Open Group Standard, the original IEEE and The Open Group  Standard
76       is  the  referee document. The original Standard can be obtained online
77       at http://www.unix.org/online.html .
78
79       Any typographical or formatting errors that appear  in  this  page  are
80       most likely to have been introduced during the conversion of the source
81       files to man page format. To report such errors,  see  https://www.ker
82       nel.org/doc/man-pages/reporting_bugs.html .
83
84
85
86IEEE/The Open Group                  2013               SCHED_GETSCHEDULER(3P)
Impressum