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 TestServer.pm
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 TestSmoke.pm.

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
        $self->kill_proc();

        $self->report_finish;
        exit;
    };

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
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to