Hey BrowserUK, thanks again for the reply!
Humm.... I was going to do your example but your first line confused me a bit... Sorry, I'm not brand new to
Perl or anything like that but I'm definitely no expert.
But since my script uses Gtk2, I can't really use the "Sleep" command in the final 'production' script, since
the regular 'sleep' command will pause the processing of Gtk events.
But for pure testing purposes only I tried this and it seemed to work:
my $pid = system 1, ".\\bg_script.pl $ARG1 \"$ARG2\" $ARG3 $ARG4";
print "\$pid == '$pid'\n";
while (kill 0, $pid)
{
print kill 0, $pid;
print "\n";
sleep 1;
}
print "\n\nOUT OF WHILE LOOP\n\n";
______________OUTPUT______________
C:\Script_dir>main_script.pl
$pid == '3144'
1
1
1
1
1
1
0
OUT OF WHILE LOOP
Nice, so it looks like its working that way.... Weird, do you think I had a typo the first time I posted
that, or do you think I can't set it to a variable and check it that way?
And just so you know, in my final script that was working before, with Proc::Background, which was before
I attempted using the CavaPackager to turn this into a standalone executable. I was using a while loop and the
usleep command from --> "use Time::HiRes qw( usleep );" which sleeps so quickly that I was able to continue
processing Gtk commands during each loop. I can show the code for that if your interested...
But anyway, in terms of the Win32::Process, when reading the cpan page for Proc::Background, it sounded like
that Proc::Background Module when run on Win32 it automatically uses the Win32::Process Module.
Is that right, or to try that Win32::Process, do I need to specifically call that, because it looks
like there is quite a good bit of a difference between the two?
Thanks Again,
Matt