in reply to Deadlock occurring, reason unknown

My immediate guess is that someone, somewhere, is buffering input and/or output and that is leading to deadlock. But tracing your intended trace of actions, that isn't the case.

My second guess is that this has something to do with the emulation on Windows of Unix functionality. I see a call to IPC::Open2, which is a wrapper around IPC::Open3. Under NT I have had mixed success. I have run stuff and had it work. But it failed with more complex stuff.

Dunno if that is the problem, but there is absolutely no way that it would be a bad idea to test the success of your open2 and close calls. Plus when you close out a process you probably need to explicitly wait to pick up your children (and be able to trap error information from them).

Now doing all that probably will not solve your problem directly, but there is a good chance that it will at the least give you a far more specific set of error messages to stare at...

  • Comment on Re (tilly) 1: Deadlock occurring, reason unknown