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

NAME

12       sched_getscheduler — get scheduling policy (REALTIME)
13

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

EXAMPLES

50       None.
51

APPLICATION USAGE

53       None.
54

RATIONALE

56       None.
57

FUTURE DIRECTIONS

59       None.
60

SEE ALSO

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