perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: t/SMOKE on win32
Date Wed, 01 Oct 2003 18:09:55 GMT
Randy Kobes wrote:
> On Tue, 30 Sep 2003, Stas Bekman wrote:
>>Barrie Slaymaker wrote:
>>>On Sep 30 2003, Stas Bekman wrote:
>>>>Isn't IPC::Run3 based on IPC::Run? So if IPC::Run doesn't work...
>>>No, it's smaller, faster, lighter ;)
>>>It's "all new code", no select().  Uses File::Temp
>>>temporary files to optionally queue up input for the
>>>child, runs the child, optionally with any stdout and/or
>>>stderr redirects to other temp files, then slurps the
>>>results.  Simple.  Portable.  Relatively efficient for
>>>small to moderate amounts of data, especially when you
>>>start comparing it to the things that IPC::Run does when
>>>faced with the odd behaviors of Win32's anonymous pipe
>>>and TCP socket APIs (you want the child to have pipe()s,
>>>but you can't select() on pipes, and I don't know how to
>>>take a pipe handle that Win32 gives me and do a blocking
>>>poll on it a la select()--WaitForMultipleObjects() might
>>>do it, but I'm no guru there).
>>So may be we could try it. If Randy says that it works for
>>him, we will happily move to use it instead ;)
> And that does seem to work! A diff appears below (not tested
> on linux) - in this, I also added a change to
> to print out a message on Win32 when shutting down the
> server, as that's expected when checking that the server
> successfully shut down in

Great, Randy, +1 to commit, but please drop

> +        print $log;

in 3 places. If you want a verbose output run with -verbose.

Barrie, IPC::Run3 introduces a problem of not handling SIGINT properly. We have:

     $SIG{INT} = sub {
         # make sure that there the server is down


And it doesn't seem to do the right thing. It aborts the child process, but 
leaves the parent running as if it didn't receive SIGINT, causing a false 
failure reports.

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message