Ticket UUID: | a0bc856dcde485c71fc657fc9387842e41b6449d | |||
Title: | Unix: Start notifier thread in Tcl_InitNotifier again if process id changed due to fork1 | |||
Type: | Bug | Version: | 8.6.0 | |
Submitter: | oehhar | Created on: | 2013-07-17 15:23:55 | |
Subsystem: | 01. Notifier | Assigned To: | oehhar | |
Priority: | 5 Medium | Severity: | Important | |
Status: | Closed | Last Modified: | 2013-09-17 06:49:31 | |
Resolution: | Accepted | Closed By: | oehhar | |
Closed on: | 2013-09-17 06:49:31 | |||
Description: |
Rivet, the Apache tcl module, does the following:
The issue is, that fileevents do not fire any more, as there is only one notifier thread in the first process. The notifier thread is invoked by all processes as the anonymous pipe is still active but has no access to shared memory and file handlers of the forked processes. The idea is to modify the exposed procedure Tcl_InitNotifier to:
Then, Tcl_InitNotifier may be called after the fork and anything is working again... The current version of Tcl_InitNotifier only creates the thread on the very first call and thus does not recreate after the fork. Some web pointers: | |||
User Comments: |
oehhar added on 2013-09-17 06:49:31:
Closed, included in tcl 8.5.15 and tcl 8.6.1 Thank you all, Harald oehhar added on 2013-07-22 12:15:59: Tested by Jan on Cygwin Tested on CentOS x86_64 with and without threaded:
oehhar added on 2013-07-22 10:58:59: The stall of test "iocmd.tf-32.1" is fixed by Jan. oehhar added on 2013-07-22 08:52:12: The added test file passes only on a patched Tcl and not on Tcl 8.5 branch. With the patch, test "iocmd.tf-32.1" waits infinitely but does not on Tcl 8.5 branch. Thus, the patch still has issues. My system:
jan.nijtmans added on 2013-07-21 15:54:33: RFE -> Bug Rebased [6f69bbba43] to core-8-5-branch, and added "testfork" test command to be used in test-case. |