in reply to Does IPC::Open3 uses temporary file?

Speaking as a veteran of many fights with IPC::Open3, I would recommend to you that there are other simpler and less problematic methods to separately capture STDOUT/STDERR from subprocesses. IPC::Run is much better at doing this simply and reliably.

There are several other CPAN modules that appear to do this in an even simpler manner than IPC::Run; IO::CaptureOutput, and System2 are two examples. I haven't used these two modules per se, so caveat programmor.

Open3 is actually pretty powerful, but with the power comes complexity -- using it feels like programming in C, and it's very easy to get yourself deadlocked if you don't manage your io handles carefully.

--DrWhy

"If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."

  • Comment on Re: Does IPC::Open3 uses temporary file?

Replies are listed 'Best First'.
Re^2: Does IPC::Open3 uses temporary file?
by Courage (Parson) on Dec 03, 2004 at 20:08 UTC
    Your post was of really much help to me, thanks.

    I tried open3 and almost succeeded, but, while asimptotically reaching final result, I still had no success on that way.

    I gained my goal using namely IPC::Run. I was stuck several times with "Win32 limitations" described in that module, however, but finally I got it.

    Finally, a program that implements quite simple thing (from unexperienced point of view), become quite complicated, but it works and hopefully does not stuck.

    I can show a code, if anyone interested on what it finally looks like.

    Best regards,
    Courage, the Cowardly Dog