Re: How to continue process without waiting for the output of system()?
- From: Narthring <Narthring@xxxxxxxxx>
- Date: Thu, 30 Aug 2007 08:45:45 -0700
On Aug 30, 9:57 am, Cod <zen...@xxxxxxxxx> wrote:
For example , I wrote:
system("calc");
print "hello";
Before the calc program is closed, the print statement will not
excute.
Any way to change the behavior?
I have tried fork, and system("calc&"), all failed.
My OS is WinXP, and I use Active Perl 5.8.8.
Thanks for your help!
If you want to use threads this will work:
use strict;
use warnings;
use threads;
my $thread = threads->create(sub { thread()});
print "hello\n";
$thread->join();
sub thread{
system("calc");
1;
}
.
- References:
- Prev by Date: Re: great and better hash eval
- Next by Date: Re: Appending a character to a field
- Previous by thread: How to continue process without waiting for the output of system()?
- Next by thread: Re: How to continue process without waiting for the output of system()?
- Index(es):
Relevant Pages
|
|