Overview
| Artifact ID: | cb58fd127dc320c2649e8a2d2c3e1fe2c6f3ba35 |
|---|---|
| Ticket: | 1696642fffffffffffffffffffffffffffffffff
sigpipes in test suite |
| User & Date: | andreas_kupries on 2007-04-10 03:33:20 |
Changes
- icomment:
Logged In: YES user_id=75003 Originator: NO Given that there is a backtrace does this mean that the core crashed ? I thought that a SIGPIPE simply causes a Tcl error to be thrown, something which can be caught ? Although, I have seen that only for actual pipes i.e. 'tclsh ... | ...' and the sigpipe happens when the consumer exists before the tclsh, pulling the rug out under tclsh. What does SIGPIPE means for a socket connection ? ... Ok, google (sigpipe, socket) delivers <<http://docs.hp.com/en/32650-90372/ch02s14.html>>, quoting: A SIGPIPE is generated when a send operation is attempted on a broken socket. One way of breaking a socket is to do a shutdown(,2) on a socket. That is the same semantics as for actual pipes, so I guess that we should behave in the same wat, throw a Tcl error. So we simply might have to catch the sigpipe and throw as tcl errors, as we do for regular pipes. ... The relevant files for that seem to be "tclUnixInit.c" and "tclUnixPipe.c", just look for 'SIGPIPE'. ... Hm. The code in UnixInit does a global SIG_IGN for this signal, to ignore it, so this should apply to sockets as well! Which of the test cases in http.test is actually breaking ? Could it be that gdb overrides our handling of sigpipe ? In that case the 'crash' might simply an artifact of execution under gdb and not an actual bug. - login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"