List Info

Thread: Re: Running another exe program from Main Perl program without interuptin




Re: Running another exe program from Main Perl program without interuptin
country flaguser name
United States
2008-03-19 01:57:39

Thanks Sandy and Jenda,

It's working for me.

I liked the Win32:: Process , since it is giving more control

Thanks

Joshy

--- In perl-beginner%40yahoogroups.com">perl-beginneryahoogroups.com, "Jenda Krynicky&quot; <Jenda...> wrote:
&gt;
> From: "joshypy" <joshypy...>
> > I would like to run another (.exe) program from my perl main program
> > without any interrupting my main program.
> >
> > Right now I am using
> >
> > system(&quot;newprogram.exe&quot;);
> >
> > But for this my main program is waiting for the new program to get
> > closed. I still want my main program to continue while the
> > "newprogram.exe" is running.
>
>
> system( 1, "newprogram.exe");
>
> From
> perldoc perlport
>
> As an optimization, may not call the command shell specified in
> $ENV{PERL5SHELL}. system(1, args) spawns an external process and
> immediately returns its process designator, without waiting for it to
> terminate. Return value may be used subsequently in wait or waitpid.
> Failure to spawn() a subprocess is indicated by setting $? to "255 <<
> 8". $? is set in a way compatible with Unix (i.e. the exitstatus of
> the subprocess is obtained by "$? >> 8", as described in the
> documentation). (Win32)
>
>
> If you need more control have a look at Win32::Process.
>;
> HTH, Jenda
&gt; ===== Jenda... === http://Jenda.Krynicky.cz =====
&gt; When it comes to wine, women and song, wizards are allowed
> to get drunk and croon as much as they like.
&gt; -- Terry Pratchett in Sourcery
>

__._,_.___
.

__,_._,___
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )