Hi, Thomas Bushnell BSG, le Tue 17 Jan 2006 13:56:05 -0800, a écrit : > The same situation happens with getpgid, and you will see that in the > case of getpgid, the C library handles the zero-argument case itself. > > I believe that the same should be done here, for the sake of > consistency. > > So it seems to me that we should fix this by changing > sysdeps/mach/hurd/getsid.c in the C library source instead.
Here it is. [glibc]/ChangeLog 2006-01-18 Samuel Thibault <[EMAIL PROTECTED]> Fix getsid(0). * sysdeps/mach/hurd/getsid.c (getsid): When parameter `pid' is 0, use _hurd_pid instead. --- glibc/sysdeps/mach/hurd/getsid.c 2006-01-18 23:43:53.000000000 +0100 +++ glibc/sysdeps/mach/hurd/getsid.c 2006-01-18 23:19:33.000000000 +0100 @@ -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); _______________________________________________ Bug-hurd mailing list Bug-hurd@gnu.org http://lists.gnu.org/mailman/listinfo/bug-hurd