On Jan 29, 2009, at 6:11 PM, Bill Moseley wrote:
Excuse my poor IPC skills, but could the SIGPIPE handler be localized just to the library's socket calls and then restored? I guess there's risk that something else might interrupt before restoring the handler.
We could do so, but then we would have to set a new signal handler before each IO operation and restore it after each IO operation. That would generate two extra system calls pr IO operation.
I'm happy to handle the SIGPIPE in my application, but I assume the library checks for errors on the socket calls so catching SIGPIPE would seem to fit into that same category of error checking. But, perhaps not.
We could, but as stated above it would generate a lot of extra overhead. The more I think of it I believe that leaving this to the user is the best option (and the docs should tell the developer this!)
Cheers, Trond
