screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File descriptors and screen and you


From: Andy Harrison
Subject: Re: File descriptors and screen and you
Date: Thu, 8 Feb 2007 08:49:11 -0500

On 2/6/07, Alan Young <address@hidden> wrote:
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?



What exactly are you trying to accomplish with your script?

--
Andy Harrison




reply via email to

[Prev in Thread] Current Thread [Next in Thread]