I was wondering if there was an API, however obscure it would be, that would allow someone to send data to another process's stdin
stream under Mac OS X. Under Linux, if I remember correctly, you can use the filesystem in /proc
to access these streams (with the correct permissions, of course).
I dunno. Mach ports, anyone?
It is possible to send input text to a running process without running the screen utility, or any other fancy utility. And it can be done by sending this input text to the process' standard input "file" /proc/PID#/fd/0 . However, the input text needs to be sent in a special way to be read by the process.
You can't "push to own stdin", but you can redirect a file to your own stdin.
Just a thought, but couldn't you make a pipe, and redirect that (named) pipe to the standard input of the process when starting that process?
Roughly somethink like
mkfifo MYPIPE
Prog < MYPIPE
echo "test" > MYPIPE
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With