libsmbclient and SIGPIPE vs EPIPE
cbp at null.net
Wed Nov 26 22:23:13 GMT 2003
I've been working on a report for bugzilla that describes a problem I was
discussing with Richard a couple of weeks ago. It turns out that the
"problem" arises if the library client is:
1) allowing SIGPIPE to go through to the keeper (SIG_DFL).
2) using SIGPIPE for some higher-level purpose.
It turns out that libsmbclient can precipitate SIGPIPE. To someone who
"knows" a thing or two about the socket(3) interface, this should have
been obvious (although, in my defence, the abstraction presented by
the library's interface is a *long* way from the socket(3) interface). On
reflection, this doesn't seem to me to be a bug--it's just undocumented
So, should we just document the relationship between the library entry-
points and SIGPIPE and move on, add a mechanism to delegate SIGPIPE
handling to the library or something else?
Tangential issue (for perople who stumble across this in the future): If
the library client does signal(SIGPIPE, SIG_IGN) as of this writing, it may
trigger bug #816 (as of this writing). I'll append a note to this "thread"
once that's been resolved.
More information about the samba-technical