Angus Leeming <[EMAIL PROTECTED]> writes: | John Levon wrote: >>> Or should the code in child_handler be truly trivial: >> Yes. > | John, I take it that you're (almost) happy with the existing signal | handling code in error_handler below. To my mind it needs only a | handling_error flag to ensure that it handles multiple signals | safely. (The SIGPIPE should be removed if it isn't an error.) > | Thoughts? | Angus > | static void error_handler(int err_sig) | { | + static sig_atomic_t handling_error = false; | + if (handling_error) | + return; | + handling_error = true;
Hmm... why do you think this is needed? -- Lgb