[Rpm-maint] Sigpipe handling in build/rpmfc.c
Michael Schroeder
mls at suse.de
Mon Jun 6 11:40:05 UTC 2011
Hi guys,
what's the reason for the complex pipe handling with sigpipe_handler(),
sigpipe_init() and sigpipe_finish()?
IMHO aborting the read when a SIGCHLD occurs is wrong, as the
pipe may still contain unread data (and data is only read in
sizeof(buf)-1 chunks). Wouldn't it make more sense to simply
ignore SIGCHLD and read until an EOF is returned, i.e. the
read returns zero bytes?
Cheers,
Michael.
--
Michael Schroeder mls at suse.de
SUSE LINUX Products GmbH, GF Jeff Hawn, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
More information about the Rpm-maint
mailing list