in reply to tty for each perl threads
You could try opening STDOUT (and/or STDERR) to the respective pty of the terminal emulator where the output is to be routed to, i.e. something like
open STDOUT, ">", "/dev/pts/7" or die $!;
To figure out which pty is associated with a certain terminal/shell, you can for example use
$ ls -l /proc/$$/fd/1 lrwx------ 1 almut almut 64 2010-03-22 00:16 /proc/25932/fd/1 -> /dev/ +pts/7
(on Linux, that is — paths may be different on other systems)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: tty for each perl threads
by sierpinski (Chaplain) on Apr 05, 2010 at 19:37 UTC | |
|
Re^2: tty for each perl threads
by ajeet@perl (Acolyte) on Apr 06, 2010 at 05:20 UTC |