in reply to Killing subprocess in windows
system does not return the PID when used in your way, but you can simulate start by using system(1, ...):
my $pid = system(1, "cmd /c powershell gc -tail 10 -wait $logfile" );
That way, you can kill it. See perlport on the form system(1, ...).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Killing subprocess in windows
by LanX (Saint) on May 20, 2021 at 21:14 UTC |