[quagga-dev 1066] Re: Bug in lib/daemon.c [PATCH]

PC Drew drewpc at ibsncentral.com
Tue Apr 20 17:42:02 BST 2004


On Apr 20, 2004, at 10:25 AM, Boris Kovalenko wrote:

>> Makes sense, but why <= -1, are there any systems where setsid 
>> returns something other than -1 on error? (why not == -1?)
>>
>    I really don't know. According to POSIX.1 setsid should return -1 
> exactly. But somebody written original code before me, so may be there 
> are some systems non POSIX comptatible. Indeed because mostly modern 
> systems are POSIX compatible I think we may just use == -1.
>
>

In my experiences, most POSIX function calls return < 0 on error, so I 
always check for that.  Is there something wrong with checking < 0 or 
<= -1?

--
PC Drew




More information about the Quagga-dev mailing list