perlquestion
sjwnih111
Hello everyone,
I'm using the following to call a child process from my script and then time it out:
<code>
my $pid = fork();
if (!$pid) {
system($command);
}
else {
sleep $max_time;
print "Since $max_time minutes have elapsed, will kill process with PID $$ ";
system("TASKKILL /F /T /PID $$");
}
</code>
Two problems, and I'm not sure what they're from.
(1) After completing the child process on time, I get a popup from windows that says "perl.exe has stopped working..."
(2) When I look in task manager, there are a bunch of Taskill.exe that seem to be left over even after I have closed the processes they were trying to kill...
If anyone has any idea what's going on it would be very helpful.