Overview
| Artifact ID: | cd65dd24d56a85115dfb42de00ec73a601284906 |
|---|---|
| Ticket: | 923072ffffffffffffffffffffffffffffffffff
atfork patch |
| User & Date: | vasiljevic on 2004-06-17 13:18:38 |
Changes
- icomment:
Logged In: YES user_id=95086 Hi David, I'm currently reviewing the patch. I have applied it to the core-8-4-branch and get problem with thread.test. The offending part: # Some tests require the testthread command -set ::tcltest::testConstraints(testthread) \ - [expr {[info commands testthread] != {}}] +#set ::tcltest::testConstraints(testthread) \ +# [expr {[info commands testthread] != {}}] -if {$::tcltest::testConstraints(testthread)} { +tcltest::constraints::cset testthread [expr {[info commands testthread] != {}}] + +if {[::tcltest::constraints::cset testthread]} { The "::tcltest::constraints::cset" is unknown. I do a simple: patch -p0 < newatfork.diff cd unix make make test .... Test file error: invalid command name "::tcltest::constraints::cset" while executing "::tcltest::constraints::cset testthread" (file "/usr/local/homes/zv/sf/core-8-4-branch/tests/thread.test" line 1) timer.test .... Another thing is: you should beware of pthread_once. This is not defined in many posix-thread implementations. Safer is to use mutex and a static int to simulate the behaviour. I will yet have to make some tests here. Where I have a bad feeling is the lock order of mutexes. You are basically looping thru all Tcl-created mutexes in an linear fashion but this might lead to deadlocks I'm afraid. The Tcl mutexes are of dynamic nature and users can creaet and lock them in any arbitrary order. I still have to verify that this won't dwarf the effort, i.e. lead to a deadlock just before the fork. This will take some time. Also, the patch provided is ment for 8.4 branch only, right? Zoran - login: "vasiljevic"
- mimetype: "text/plain"
- username: "vasiljevic"