about summary refs log tree commit diff
path: root/hurd/hurdprio.c
diff options
context:
space:
mode:
Diffstat (limited to 'hurd/hurdprio.c')
-rw-r--r--hurd/hurdprio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hurd/hurdprio.c b/hurd/hurdprio.c
index ba95421c22..7530c8f34c 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;