in reply to Re^3: How to monitor a child process from a perl script
in thread How to monitor a child process from a perl script
if ($pid=fork) { print $pid, "\n"; do{ if (-e "mdinfo") { $last=`tail -1 mdinfo`; if ($last =~ /Density/) { @last_mdinfo=split ' ',$last; $den=$last_mdinfo[2]; } } } while ($den < 1.0000 or $den > 1.005); kill 15, $pid; } elsif (defined($pid)) { exec(qq(/opt/amber/bin/sander -i ele1.0.mdin -c ele1.0.inpcrd -p e +le1.0.prmtop -o ele1.0.mdout -r ele1.0.restrt &)); exit(0); } else { print "child was not created\n"; } print "done\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How to monitor a child process from a perl script
by JavaFan (Canon) on Aug 14, 2009 at 23:20 UTC |