
On Feb 5, 2010, at 02:56 , Bardur Arantsson wrote:
I should have posted this earlier, but the exact message I'm seeing in the case where the Bad Client disconnects is this:
hums: Network.Socket.SendFile.Linux: resource vanished (Broken pipe)
Oddly, I haven't been able to reproduce this using a wget client with a ^C during transfer. When I "disconnect" wget with ^C or "pkill wget" or even "pkill -9 wget", I get this message:
hums: Network.Socket.SendFile.Linux: resource vanished (Connection reset by peer)
(and no leak, as observed by "lsof | grep hums").
"Broken pipe" is normally handled as a signal, and is only mapped to an error if SIGPIPE is set to SIG_IGN. I can well imagine that the SIGPIPE signal handler isn't closing resources properly; a workaround would be to use the System.Posix.Signals API to ignore SIGPIPE, but I don't know if that would work as a general solution (it would depend on what other uses of pipes/sockets exist). -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH