Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Perl: the Markov chain saw
 
PerlMonks  

Re: IPC::Run and /dev/tty

by idsfa (Vicar)
on Oct 31, 2006 at 10:55 UTC ( [id://581519]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to IPC::Run and /dev/tty

More on point of your earlier post, here's what is going on. Some programs (misguidedly, IMHO) attempt to enforce what their author considers "security" by reading or writing only to the controlling terminal. The idea being that it will somehow prevent input and output from being redirected (or intercepted), and that this is desirable. It doesn't and it isn't.

To get around this, you need to change the controlling terminal from an existing device to your in/out/err filehandles. IO::Pty has a nice little method called make_slave_controlling_terminal(), which will take care of the necessary setsid() and filehandle hokey-pokey. To be completely lazy, you might want to look at the try script that comes with it (and basically does exactly what you want -- runs another program and logs the output).


The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon

Replies are listed 'Best First'.
Re^2: IPC::Run and /dev/tty
by former33t (Scribe) on Oct 31, 2006 at 19:43 UTC
    The 'try' program you linked to worked well. Thanks for your help.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://581519]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.