Each thread gets its own perl interpreter which is a clone
of its parent when the the thread was created. As such, all
file handles (including STDERR) are duplicated when a thread
is created. Because of this, closing and reopening STDERR
in one thread does not affect STDERR in other threads.
Also, signals are not propagated to each thread. Under
Cygwin, for example, only the main thread interpreter gets
them. (It may be that under other OS's the currently active
interpreter will act on a signal. You'll have to test this
to be sure.)
Using threads v1.27 or later, you can send signals to
threads. The code below may work for you:
(0)
]
