in reply to Re^2: Terminating a parallel process opened with "system(..)"
in thread Terminating a parallel process opened with "system(..)"
See how you get on with this version?
#! perl -slw use strict; my $filename = $ARGV[0]; my( $ext ) = $filename =~ m[(\.[^.]+)$]; my( $assoc ) = `assoc $ext` =~ m[=(.+)$]; my( $ftype ) = `ftype $assoc` =~ m[=(.+)$]; $ftype =~ s[%(\w+)%][ $ENV{ $1 } ]ge; $ftype =~ s[^("[^"]+?"|\S+)\K.+$][]; #" print $ftype, ':', $filename; my $pid = system 1, $ftype, $filename; print $pid; sleep 10; kill 9, $pid;
Note: This isn't intended to be a complete replacement for the start command, just a starting point for you to adapt to your needs.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Terminating a parallel process opened with "system(..)"
by palkia (Monk) on Jun 03, 2012 at 22:05 UTC | |
by BrowserUk (Patriarch) on Jun 03, 2012 at 22:31 UTC |