[Freeipa-devel] [PATCHES] 206-209 Add default CFLAGS & fix hardened build
Alexander Bokovoy
abokovoy at redhat.com
Fri Dec 6 13:26:32 UTC 2013
On Fri, 06 Dec 2013, Jan Cholasta wrote:
>>>>>>However, even if writing to the pipe failed, we still need to wait
>>>>>>until
>>>>>>thread dies with pthread_join(). I think returning -1 here is
>>>>>>premature.
>>>>>
>>>>>Fixed, updated patches attached.
>>>>>
>>>>>Also removed CFLAGS duplication, see patch 212.
>>>>
>>>>Thanks you! The build works fine, ACK for 206-208, 212.
>>>>
>>>>Alexander, is the C part OK? It seems a do-while loop would make sense
>>>>here.
>>>I think do-while would be cleaner, purely from intent expression point
>>>of view.
>>>
>>
>>I actually like it the way it is, because it follows the
>>
>> ret = func()
>> if (ret == -1) {
>> }
>>
>>pattern, which is used abundantly in our code.
>>
>
>... but I don't have a strong opinion about this, so whatever floats
>your boat.
Thanks. It is just that in this case
- write(ctx->stopfd[1], "", 1);
+ do {
+ ret = write(ctx->stopfd[1], "", 1);
+ } while (ret == -1 && errno == EINTR);
makes more clear that we loop here only for EINTR.
ACK from my side
--
/ Alexander Bokovoy
More information about the Freeipa-devel
mailing list