Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: capture STDOUT when some jerk opened STDOUT to /dev/tty

by Tommy (Chaplain)
on Jan 07, 2013 at 21:47 UTC ( #1012118=note: print w/replies, xml ) Need Help??


in reply to Re: capture STDOUT when some jerk opened STDOUT to /dev/tty
in thread capture STDOUT when some jerk opened STDOUT to /dev/tty

Sure, rub it in that we don't get to have screen at $work ;_;

You know I even tried ssh 0 cmd!! Using screen is a really cool idea though.

Originally I was just wondering if there was an obvious Perl solution to the problem that I was just either overlooking or of which I was unaware.

Tommy
"Perl follows the principle of least astonishment"

Replies are listed 'Best First'.
Re^3: capture STDOUT when some jerk opened STDOUT to /dev/tty
by salva (Abbot) on Jan 07, 2013 at 22:56 UTC
    Well, you can write your own tty logger using IO::Pty. It shouldn't be too complex.

    Another option may be to run the program through strace logging the interesting events. Then post-process that information to obtain a clean log of the data written to /dev/tty

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1012118]
help
Chatterbox?
[Corion]: *core
[Corion]: ** chore
[Corion]: So I guess I will simply implement the linear scan first and wait with more fancy stuff until it becomes a problem
[karlgoethebier]: Lady_Aleena: ++ for "The Man Crusher Everyday"
[karlgoethebier]: this mad my day
[karlgoethebier]: no typo
[marioroy]: At the Fransiscan monastery, got stuck up high in a tree from pruning and the chainsaw with large branch fell and broke the latter, but not me fortunately. Was stuck there for a while until a firetruck came by.
[Corion]: marioroy: So you live dangerously ...
[Lady_Aleena]: s/latter/ladder/; # ? marioroy
[karlgoethebier]: marioroy: Praise the Lord

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (12)
As of 2017-05-29 08:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?