[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
File descriptors and screen and you
From: |
Alan Young |
Subject: |
File descriptors and screen and you |
Date: |
Tue, 06 Feb 2007 21:58:32 +0000 |
User-agent: |
Thunderbird 1.5.0.9 (X11/20070101) |
I have a bit of perl code that I'm trying to make work:
sub DB::get_fork_TTY {
open my $SCREEN, qq{&3>1 screen -t 'Child $$' sh -c "tty &1>3 ; sleep
1000000" |}
or return '';
my $tty = <$SCREEN>;
return $tty;
}
I'm getting bad file descriptor errors, so I'm assuming screen is
cleaning up what it hands to it's children. Which makes sense.
I want to avoid going the tmp file route if at all possible. Is there a
way I can echo tty's output so that I can grab it from a filehandle?
I've tried a number of different methods.
Any pointers?
- File descriptors and screen and you,
Alan Young <=