in reply to How to monitor a child process from a perl script
If the pmemd executable in question is this one, then you shoudl be able to ahieve your goal by redirecting the output back to your script through a pipe using the piped open.
One Windows the syntax would be something like:
my $pid = open KID, '-|', 'pmemd -O con' or die $!; while( <KID> ) { kill 'INT', $pid if m[some data]; }
On *nix, you'd probably use something like tty (or pty?) instead of con to direct the output through the pipe.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to monitor a child process from a perl script
by oscarjiao (Novice) on Aug 13, 2009 at 04:31 UTC | |
by BrowserUk (Patriarch) on Aug 13, 2009 at 05:35 UTC | |
by oscarjiao (Novice) on Aug 13, 2009 at 22:29 UTC | |
by BrowserUk (Patriarch) on Aug 14, 2009 at 04:00 UTC |