mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 19:00:07 +00:00
1999-09-05 Roland McGrath <roland@baalperazim.frob.com>
* hurd/hurdprio.c (_hurd_priority_which_map): If WHO is zero default it to getpid () for PRIO_PROCESS, geteuid () for PRIO_USER.
This commit is contained in:
parent
4fe53b3aba
commit
1a658b79cf
@ -36,7 +36,7 @@ _hurd_priority_which_map (enum __priority_which which, int who,
|
|||||||
{
|
{
|
||||||
case PRIO_PROCESS:
|
case PRIO_PROCESS:
|
||||||
npids = 1;
|
npids = 1;
|
||||||
pids[0] = who;
|
pids[0] = who ?: getpid (); /* XXX function could special-case self? */
|
||||||
err = 0;
|
err = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -45,6 +45,8 @@ _hurd_priority_which_map (enum __priority_which which, int who,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PRIO_USER:
|
case PRIO_USER:
|
||||||
|
if (who == 0)
|
||||||
|
who = geteuid ();
|
||||||
err = __USEPORT (PROC, __proc_getallpids (port, &pids, &npids));
|
err = __USEPORT (PROC, __proc_getallpids (port, &pids, &npids));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user