From: Roland McGrath Date: Sun, 5 Sep 1999 08:44:50 +0000 (+0000) Subject: 1999-09-05 Roland McGrath X-Git-Tag: upstream/2.20~19788 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1a658b79cf9b90b0035269bae15c9cedb3c23995;p=platform%2Fupstream%2Flinaro-glibc.git 1999-09-05 Roland McGrath * hurd/hurdprio.c (_hurd_priority_which_map): If WHO is zero default it to getpid () for PRIO_PROCESS, geteuid () for PRIO_USER. --- diff --git a/hurd/hurdprio.c b/hurd/hurdprio.c index ba95421..7530c8f 100644 --- a/hurd/hurdprio.c +++ b/hurd/hurdprio.c @@ -36,7 +36,7 @@ _hurd_priority_which_map (enum __priority_which which, int who, { case PRIO_PROCESS: npids = 1; - pids[0] = who; + pids[0] = who ?: getpid (); /* XXX function could special-case self? */ err = 0; break; @@ -45,6 +45,8 @@ _hurd_priority_which_map (enum __priority_which which, int who, break; case PRIO_USER: + if (who == 0) + who = geteuid (); err = __USEPORT (PROC, __proc_getallpids (port, &pids, &npids)); break;