[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] Fix setsid(0)
From: |
Marco Gerards |
Subject: |
Re: [RFC] Fix setsid(0) |
Date: |
Tue, 17 Jan 2006 10:25:44 +0100 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Thomas Bushnell BSG <tb@becket.net> writes:
> 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?
The glibc manual, I assume:
`The `setsid' function returns the new process group ID of the
calling process if successful. A return value of `-1' indicates an
error. The following `errno' error conditions are defined for this
function:'
And I would assume the prototype has a pid_t as return type, but I
haven't studied the sourcecode of the Hurd to look that up.
--
Marco