Excerpts from Brian Aker's message of Wed Jan 04 23:01:41 -0800 2012: > Hi! > > On Jan 3, 2012, at 10:27 PM, Clint Byrum wrote: > > > On second look, I think the way I'm handling some errors may need some > > If the child dies before it can close, and dup/close was never issued, then I > believe the child will be left with a read() that will never be called. >
I'm not sure I fully understand. The parent reads, and the child writes. If the pipe is disconnected then the child will get an EPIPE and/or SIGPIPE and die, likewise if the child is killed before or while the parent is doing read().. also the parent will get a SIGCHLD if the child dies, which it handles by copying the exit status and then calling _exit with that error. > > work. I'm not sure perror+exit is the right thing to do on close error, > > though I think its pretty unlikely there'd even be an error. > > Technically, EXIT_SUCCESS and EXIT_FAILURE are all that should be returned > via error, but this is often violated (and 127 is also reserved, but no > constant was ever defined for it). wait() has some very simple mechanics for > determined errors. > > > Anyway, I think that branch solves the problem in the way you describe. > > The read issue exists, but otherwise? It certainly will work. > > Cheers, > -Brian _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

