Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

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.

Replies are listed 'Best First'.
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 (Hermit) 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://891782]
Approved by Corion
Front-paged by Corion
and the questions are moot...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2018-02-26 04:21 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (316 votes). Check out past polls.