Hi, firstly thanks for your support regarding my thread issues. :) I was not able to try out the Proc::Background method cause our active state version does not have this package by default. (well i can download it i know, but as other people might try to run this code, i figured i'd stick to the common packages). Anyway, I looked at your thread though and tried the queuing and seems like it's the (thread-safe) way to go and is a much better design, but I still end up with the same problem. Though now i think I found something is wrong with my question, it should have read "Cancel the BATCH file executed by a system call from a thread in main." pardon my mistake. any thoughts?
| [reply] |
| [reply] |
my @jobs ;
...
push @jobs, Proc::Background->new( $command, $arg1, $arg2 );
...
$jobs[0]->die if $jobs[0]->alive;
| [reply] [d/l] |