[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] Fix setsid(0)

From: Manuel Menal
Subject: Re: [RFC] Fix setsid(0)
Date: Tue, 17 Jan 2006 10:50:48 +0100
User-agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317)

Thomas Bushnell BSG wrote:
Samuel Thibault <samuel.thibault@ens-lyon.org> 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...).


Manuel Menal

reply via email to

[Prev in Thread] Current Thread [Next in Thread]