2006-01-18 Samuel Thibault <samuel.thibault@ens-lyon.org>
authorroland <roland>
Tue, 21 Feb 2006 02:32:31 +0000 (02:32 +0000)
committerroland <roland>
Tue, 21 Feb 2006 02:32:31 +0000 (02:32 +0000)
[BZ #2178]
* sysdeps/mach/hurd/getsid.c (getsid): When parameter PID is zero,
use _hurd_pid instead.

sysdeps/mach/hurd/getsid.c

index 57c10c5..9dcfa90 100644 (file)
@@ -28,6 +28,9 @@ getsid (pid_t pid)
   error_t err;
   pid_t sid;
 
+  if (pid == 0)
+    pid = _hurd_pid;
+
   err = __USEPORT (PROC, __proc_getsid (port, pid, &sid));
   if (err)
     return (pid_t) __hurd_fail (err);