Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Send a keyboard input to a process

by ISAI student (Scribe)
on Mar 07, 2011 at 09:45 UTC ( #891782=perlquestion: print w/ replies, xml ) Need Help??
ISAI student has asked for the wisdom of the Perl Monks concerning the following question:

Hello all. Say I have a process with a process ID (may be unrelated to the PERL script process), and I want to send it a keyboard message. Is that possible via PERL? I.E.
sendProcessMessage( 9010 "1 is one\n");
And process which id is 9010 will act as if it was just input "is is one" and a \n (if needed, one can add \r)? Thanks.

Comment on Send a keyboard input to a process
Download Code
Re: Send a keyboard input to a process
by Anonymous Monk on Mar 07, 2011 at 09:52 UTC
Re: Send a keyboard input to a process
by andal (Friar) on Mar 08, 2011 at 07:41 UTC
    Depends on the process, not on perl. Some processes don't handle any keyboard input, so you can't send any input to that process. Those processes that handle input may do it using different ways, via controlling tty, or via events loop of GUI.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://891782]
Approved by Corion
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2014-08-30 21:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls