Overview
| Artifact ID: | 87ba4e367ae62b27169d99c99be6bf1d28572253 |
|---|---|
| Ticket: | 219045ffffffffffffffffffffffffffffffffff
Core dumps on SIGINT in multithreaded application after retu |
| User & Date: | nobody on 2000-10-26 01:09:51 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 4112 Bug Version: 8.2.3 SubmitDate: '2000-02-01' LastModified: '2000-02-07' Severity: CRIT Status: Released Submitter: techsupp ChangedBy: hobbs OS: Solaris OSVersion: Solaris 2.7 Machine: Sun Ultra 30 FixedDate: '2000-02-07' FixedInVersion: 8.3b1 ClosedDate: '2000-10-25' Name: Stephan Voges CustomShell: We redefine the "puts" command. ObservedBehavior: We use Tcl 8.2.3 in a multithreaded application. This application installs its own handler for SIGINT. We observe that if the script contains an "exec" command, any Ctrl-C after the "exec" will cause a core dump. Searching for the string "SIGINT" through the Tcl source, we found that in the file tclUnixPipe.c, there is a function RestoreSignals that sets the handler for SIGINT back to default. If we modify this code to set it to our handler, the problem goes away. We also noticed that RestoreSignals is called in a process spawned by vfork, which according to the man pages is not MT-safe. DesiredBehavior: Tcl shouldn't change our signal handlers. If it needs to temporarily, or if something else might, it should save state and restore state afterwards. Patch: Diff output: note that this was just a hack, we declared our handler 30a31 > extern void my_handler (int sig); 493c494 < signal(SIGINT, SIG_DFL); --- > signal(SIGINT, my_handler); PatchFiles: tclUnixPipe.c This should be solved in 8.3, where we no longer attempt to use vfork at all due to reasons like the above. Please tell us if that doesn't fix this particular case (it did solve other signal related issues with vfork). -- 02/05/2000 hobbs User verified that 8.3b2 works as expected. -- 02/07/2000 hobbs
- foundin changed to: "final: 8.2.3"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "49. Threading"
- title changed to:
Core dumps on SIGINT in multithreaded application after retu
- type changed to: "Bug"