perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: t/SMOKE on win32
Date Wed, 01 Oct 2003 17:53:22 GMT
Barrie Slaymaker wrote:
> On Tue, 2003-09-30 at 17:12, Stas Bekman wrote:
> 
>>>The major non-feature is that you can't have a coprocess; the parent
>>>blocks while the child runs.
>>
>>You mean if you spawn a child from a process spawned by IPC::Run3?
> 
> 
> When you spawn a child from the parent, the parent blocks.  So in
> 
>     use IPC::Run3 qw( run3 );
> 
> 
>     my @cmd = qw( slow_thingy.pl );
> 
>     run3 \@cmd, \$in, \$out, \$err;
> 
> , the call to run3() does not return until slow_thingy.pl exits and if
> you use CODE refs (instead of SCALAR refs) for redirecting
> slow_thingy.pl's console I/O, they won't be called until slow_thingy.pl
> exit()s.  So you can't interact
> 
> This differs from IPC::Run::run() where you can use CODE refs for
> stdout/stderr redirection and interact with the child process by having
> your stdout/stderr handlers feed input back in to the child process via
> its stdin.

Since we use just a plan SCALAR ref I think it'll work for us.

BTW, the IPC::Run3 manpage doesn't mention that you can pass CODE refs for I/O 
streams.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message