Here is my sample perl program.
my $pid = fork();
if(! $pid )
{
exec("perl sleep.pl 600");
}
else
{
print "PID ==== [$pid]\n";
sleep 30;
print "killing the PID [$pid] in 20 seconds\n";
sleep 20;
kill 9, $pid;
print "Done ....\n";
}
The PID returns the pseudo process ID ( which is a negative number). When kill command sends 9 signal to the pseudo process ID, ( I assume the exec process ID falls under pseudo process ID) the exec process won't get killed.
Any help on how to kill the exec process on windows? I'm running this program on Windows XP.
Thanks In Advance
Hansini