[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 13:50:34 +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?
[Looks like my mail wasn't sent to bug-hurd, so I'm resending - sorry if
you receive it twice]
I think Samuel meant getsid(0). setsid() does not take any argument and
his patch modifies getsid() anyway.
XPG4 specifies that getsid(0) should return the process group ID of the
process that is the session leader of the calling process. That's how
session ID are defined in GNU/Hurd and in any other operating system I
know (at least in GNU/Linux, *BSD and Solaris).
Cheers,
--
Manuel Menal