wisely says, read perlipc
. Every topic below is discussed, in more detail and with examples.
The parent script then generates signals to the running child exec
Communicating via STDIN to the child would probably be easier than signals. Like in IPC::Open2
how can I get a stdout line from the child immediatly in the parent script?
If you are piping
(which you need to do if you are running via exec
), you need to turn on autoflush. See IO::Handle
And how do I tell in the parent script when the child has finished?
can test if the executable is still running (kill(0, $pid)
can be used to reap the child. IO::Select
can be used to check if the child has something to say.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.