[SSSD] [PATCH] SERVER: Check the return value of waitpid

Ondrej Kos okos at redhat.com
Mon Nov 19 12:43:45 UTC 2012


On 11/19/2012 12:15 PM, Jakub Hrozek wrote:
> On Mon, Nov 19, 2012 at 10:23:45AM +0100, Ondrej Kos wrote:
>> On 11/19/2012 12:05 AM, Jakub Hrozek wrote:
>>> We should at least print an error message and error out if waitpid()
>>> fails.
>>>
>>> https://fedorahosted.org/sssd/ticket/1651
>>>
>>>
>>>
>>> _______________________________________________
>>> sssd-devel mailing list
>>> sssd-devel at lists.fedorahosted.org
>>> https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
>>>
>>
>> I noticed this warning while compiling:
>>
>> src/util/server.c: In function 'become_daemon':
>> src/util/server.c:123:18: warning: 'ret' may be used uninitialized
>> in this function [-Wmaybe-uninitialized]
>>
>> Could you please add the missing initialization? Ack on the patch though.
>>
>> Ondra
>
> Interesting, I don't see that warning..but gcc is right, in case the
> waitpid call failed, we would return garbage and I would just
> substitute one Coverity warning for another.
>
> Thanks, a new patch is attached.
>
>
>
> _______________________________________________
> sssd-devel mailing list
> sssd-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
>
works for me, Ack

Ondra

-- 
Ondrej Kos
Associate Software Engineer
Identity Management
Red Hat Czech

phone: +420-532-294-558
cell:  +420-736-417-909
ext:   82-62558
loc:   1013 Brno 1 office
irc:   okos @ #brno



More information about the sssd-devel mailing list