Thomas Bushnell BSG wrote:
Samuel Thibault <[EMAIL PROTECTED]> writes:

Currently, setsid(0) always return 1, while it should return the sid of the calling process. Here is a proposed patch:

I have no particular objection, but what is the standard that specifies its return value this way?

I was aso wondering about that. First, I think Samuel meant getsid(0),
because setsid takes no argument and because his patch modifies
getsid(), not setsid().

This behaviour is specified in XPG4, which says that getsid(pid) should
return "the process group ID of the process that is the session leader
of the process specified by pid". That's how session IDs are defined in
all the systems I know (GNU/Linux, GNU/Hurd, *BSD, Solaris...).

Cheers,

--
Manuel Menal


_______________________________________________
Bug-hurd mailing list
Bug-hurd@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-hurd

Reply via email to