Overview
| Artifact ID: | 6ee765099b38ab07c375c6ec58a8f2dd9cc92960 |
|---|---|
| Ticket: | 749639ffffffffffffffffffffffffffffffffff
exit fom child process hangs if --enable-threads set |
| User & Date: | dizzi on 2003-06-05 16:31:15 |
Changes
- assignee changed to: "andreas_kupries"
- cmimetype changed to: "text/plain"
- comment changed to:
When compiled with --enable-threads Tcl8.4.3 doesn't handle correctly the exit from child processes created with fork if they don't execl some other program. The problem is explained in detail in this bug report against TclX that I filed yesterday, which seems in fact a Tcl8.4 bug: http://sourceforge.net/tracker/index.php?func=detail&aid=748835&group_id=13247&atid=113247 The problem seems to be that when the child process exits without executing another program it sends a 'q' message to a notifier process that belongs to its parent. The child then waits for some signal from the parent that is never sent and hangs forever. It is true that Tcl doesn't have the fork and execl commands, but these commands are provided by the TclX extension and they can't work correctly because of a bug in the Tcl exit code. The patch in attachment seems to fix the problem, but since I don't really know how the threaded notifier works it may be wrong. My solution simply does nothing in Tcl_FinalizeNotifier() if the current process is not the one which created the notifier thread. In this way the notifier thread can be terminated only by its parent and child processes should be able to exit without interfering with the parent threads. -- Massimo Dal Zotto <[email protected]>
- foundin changed to: "obsolete: 8.4.3"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "dizzi"
- subsystem changed to: "49. Threading"
- title changed to:
exit fom child process hangs if --enable-threads set
- type changed to: "Bug"