̾??
getpriority
,
setpriority
—
?ץ??????ॹ?????塼??ͥ?????̤?????
/ ???ꤹ??
Standard C Library (libc, -lc)
which ?????? who
?ǻؼ????????ץ????????ץ????????롼?ס?
?ޤ??ϥ桼???Υ??????塼??ͥ?????̤?
getpriority
()
?????ƥॳ?????Ǽ??????졢
setpriority
()
?????ƥॳ?????????ꤵ???ޤ???
which ?????ϡ?
PRIO_PROCESS
, PRIO_PGRP
?ޤ??? PRIO_USER
?Τɤ줫?Ǥ??ꡢ who ??
which
?˴?Ϣ???Ʋ??ᤵ???ޤ?
(PRIO_PROCESS
?ξ????ϥץ????????̻ҡ?
PRIO_PGRP
?ξ????ϥץ????????롼???̻ҡ???????
PRIO_USER
?ξ????ϥ桼?? ID)??
who ???ͤ? 0 ?Ǥ????Τϡ?
???ߤΥץ????????ץ????????롼?ס??ޤ??ϥ桼????ɽ???ޤ???
prio ?????? -20 ???? 20
???ϰϤ??ͤǤ???
?ǥե????Ȥ?ͥ?????̤? 0 ?Ǥ???
ͥ?????̤??㤤?ȡ????????塼??Ĵ???ˤϤ????Թ礬?褯?ʤ??ޤ???
getpriority
()
?????ƥॳ?????ϡ??????Υץ??????Τ????줫???????????ǹ???ͥ?????̤?
?֤??Ƥ??ޤ? (?Ǥ⾮???????ͤǤ?)??
setpriority
()
?????ƥॳ?????ϡ????ꤵ?줿???٤ƤΥץ???????ͥ?????̤????????ͤ????ꤷ?ޤ???
?????ѥ桼????????ͥ?????̤??㤯?Ǥ??ޤ???
getpriority
()
?Ͻ?????????????λ???Ƥ??? -1
???֤????Ȥ??????Τǡ?
?ƤӽФ??????˳????ѿ?
errno
?ꥢ???Ƥ??顢???ˤ??????????å????? -1
?????顼?Ǥ??뤫??
?ޤ??????????ͤǤ??뤫Ƚ?ꤹ??ɬ?פ??????ޤ???
The setpriority
() function returns the value 0
if successful; otherwise the value -1 is returned and the global
variable errno is set to indicate the error.
getpriority
()
?? setpriority
()
?????ƥॳ?????ϼ??ξ????˼??Ԥ??ޤ?:
- [
ESRCH
]
- ???ꤵ?줿 which ??
who
???ͤ????Ѥ??Ƥ????ץ??????????Ĥ????ޤ????Ǥ?????
- [
EINVAL
]
- which ??????
PRIO_PROCESS
,
PRIO_PGRP
?ޤ???
PRIO_USER
?Τɤ??Ǥ⤢???ޤ????Ǥ?????
?嵭?Υ??顼?????Ǥʤ???
setpriority
()
?ϼ??ξ????˼??Ԥ??ޤ?:
- [
EPERM
]
- ?ץ??????ϸ??Ф??줿???ΤΡ????μ¸?
ID ???¥桼?? ID ??
?ɤ????⡢?ƤӽФ?¦?μ¸??桼??
ID ?˰??פ??ޤ????Ǥ?????
- [
EACCES
]
- ?????ѥ桼???Ǥʤ????Τ??ץ???????ͥ?????̤??褦?Ȥ??ޤ?????
getpriority
() ?????ƥॳ??????
4.2BSD
?ǤϤ??????о줷?ޤ?????