in reply to cleanly exiting threads
As I understand things, open2 forks (duplicating all the threads) and calls _exit if there's an error calling exec (causing threads to be exited prematurely in the child). I think your problem is related to that.
And isn't the work directory a per-process state? If so, there's a race condition in your code.
thread 1: chdir thread 2: chdir thread 2: open thread 1: open OOPS, chdir isn't as expected
And another bug: You use open2 without waitpid, or do you set $SIG{PIPE} to handle that elsewhere?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: cleanly exiting threads
by JoeKamel (Acolyte) on Aug 13, 2008 at 18:20 UTC | |
|
Re^2: cleanly exiting threads
by JoeKamel (Acolyte) on Aug 14, 2008 at 02:03 UTC |