in reply to Re: IPC::Open2, WinXP, Perl 5.6.1
in thread IPC::Open2, WinXP, Perl 5.6.1

Thanks for the response but, as I said I'm on Windows. Checking for SIGPIPE is not an option (I'm not using Cygwin).

Also, as there is no exception being thrown, the pid is *always* set. I assume it is the shell's pid.

Replies are listed 'Best First'.
Re: Re: Re: IPC::Open2, WinXP, Perl 5.6.1
by PodMaster (Abbot) on Feb 11, 2004 at 13:05 UTC
    Right. $^E and $? are still available.

    watch dem wheels turn

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

      Just what good are those going to do?

      The $? is the same as the pid returned by open2.

      $^E is a system-wide variable which can be set by any program running in the system (I'm on Windows remeber?). It's value is persistent across processes until somebody sets it to a new value (by causing some error). I cannot rely on that to check wether the call to open2 succeded or not. Also, $^E is never "reseted" or "unseted".

      The reality is that if open2 failes, no exception will be thrown and there is no way check for failure (until I actually try to read/write on those pipes, of course).

        The $? is the same as the pid returned by open2.

        So what? According to the docs (perlvar, etc) it should have the info you need.

        $^E is not system wide and you can set it to whatever you want whenever

        E:\>perl -le"warn $^E;$^E=1;warn $^E;undef $^E;die $^E" Warning: something's wrong at -e line 1. Incorrect function at -e line 1. Died at -e line 1.
        You can always try your hand at IPC::Run3. I can't wait to see what you come up with.

        MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
        I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
        ** The third rule of perl club is a statement of fact: pod is sexy.