![]() |
|
Welcome to the Monastery | |
PerlMonks |
Re^2: question about running a system and a perl function backgroundby Anonymous Monk |
on Jan 07, 2005 at 14:08 UTC ( [id://420254]=note: print w/replies, xml ) | Need Help?? |
Hello graff,
I have been attempting to do the same thing using threads according to BrowserUK's solution. But due to some complicated issues with the system I am using, I am trying to attempt the same thing using fork and exec instead. Is it possible to have some arrangement whereby the original process sets up a separate STDOUT/STDIN prior to forking each command and then uses select to read the output from the child processes back into the parent for further possessing? BrowserUK also is interested in seeing a working example using fork and exec. So after the process forks, can I read each line that the process outputs, see if that line contains a search word I am looking for and if it does, stop all other forks immediately.
If you could provide a working example, me and BrowserUK would learn a lot. Thank you.
In Section
Seekers of Perl Wisdom
|
|