Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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

by salva (Abbot)
on Jan 07, 2013 at 22:56 UTC ( #1012127=note: print w/replies, xml ) Need Help??


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

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