in reply to Multithreaded script keeps files locked when reading output from multiple processes on Windows
On win32 threads share STDIN/STDOUT/STDERR, you get one of those per process, and when you do pipe-open, perl dup's each of STDIN/STDOUT/STDERR ...
so something something fork emulation keeps the filehandles alive and in use and undeletable
if you add close STDIN; close STDOUT; in sub thread, you'll get different output, like
Filehandle STDIN reopened as only for output
and
Still cant remove file1 because No such file or directory instead of Permission denied
This isnt printed No such file or directory
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Multithreaded script keeps files locked when reading output from multiple processes on Windows (on win32 threads share STDIN/STDOUT/STDERR so close STDIN; close STDOUT;)
by rmahin (Scribe) on Jan 10, 2014 at 16:43 UTC |