in reply to Re: Capture Exit Code Using Pipe & Tee
in thread Capture Exit Code Using Pipe & Tee

I've tried your suggestion. I can't seem to get it to write anything anywhere now. Ideally I would like it to be real-time. I can't see in the example where the execution of make is taking place. Thanks for your help!!
  • Comment on Re^2: Capture Exit Code Using Pipe & Tee

Replies are listed 'Best First'.
Re^3: Capture Exit Code Using Pipe & Tee
by shmem (Chancellor) on Jan 31, 2007 at 21:41 UTC
    The make is invoked via open, which returns the process ID of the spawned command. merlyn's code should work alright, with a slight modification
    open my $make, "make -f params 2>&1 |" or die;
    to get make's STDERR into the spawning shell's STDOUT. Do you get any errors reported?

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}