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

Boris Kovalenko boris at tagnet.ru
Tue Apr 20 17:25:31 BST 2004


Paul Jakma wrote:

>On Sun, 18 Apr 2004, Boris Kovalenko wrote:
>
>  
>
>>Hello!
>>
>>   There is a bug in lib/daemon.c where we are checking return
>>value from setsid(). According to FreeBSD mans the return value of
>>setsid() is -1 if error occured, so I suggest to use my patch.
>>Special thanks to Oliver Bandel for the report.
>>    
>>
>
>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.

With respect,
    Boris




More information about the Quagga-dev mailing list