Samuel Thibault <[EMAIL PROTECTED]> writes: > [hurd]/proc/Changelog > 2006-01-17 Samuel Thibault <[EMAIL PROTECTED]> > > Fix setsid(0). > > * pgrp.c (S_proc_getsid): When pid == 0, use `callerp' argument > instead of pid_find(pid). > > Index: pgrp.c > =================================================================== > RCS file: /cvsroot/hurd/hurd/proc/pgrp.c,v > retrieving revision 1.23 > diff -u -p -r1.23 pgrp.c > --- hurd/proc/pgrp.c 8 May 2002 09:24:52 -0000 1.23 > +++ hurd/proc/pgrp.c 17 Jan 2006 02:59:59 -0000 > @@ -141,7 +141,11 @@ S_proc_getsid (struct proc *callerp, > pid_t pid, > pid_t *sid) > { > - struct proc *p = pid_find (pid); > + struct proc *p; > + if (pid == 0) > + p = callerp; > + else > + p = pid_find (pid); > if (!p) > return ESRCH;
Thanks for the discussion. This patch seems like the right idea. 1: You should remove the comment that CALLERP is ignored. 2: CALLERP may be null if the RPC is received on the wrong kind of port (in which case EOPNOTSUPP should be returned). Can you propose a revised patch? Thomas _______________________________________________ Bug-hurd mailing list Bug-hurd@gnu.org http://lists.gnu.org/mailman/listinfo/bug-hurd