in reply to Re: Usage of IPC::Open2 ...
in thread Usage of IPC::Open2 ...

Note also that IPC::Open3 will do the same thing as open2, but catches stderr also, so that's another option.

Update: As Dominus kindly pointed out, this does not solve the immediate problem, but if you decide that differentiating between STDERR/STDOUT is something you will end up needing to do with this specific issue or in a future one, IPC::Open3 is something you may wish to look into. Obviously you can't use it as a drop-in replacement for open2 in your code and have things magically work. It's an alternative at more of a design level.

Replies are listed 'Best First'.
Re: Usage of IPC::Open2 ...
by Dominus (Parson) on Nov 26, 2000 at 20:05 UTC
    Says fastolfe:
    > Note also that IPC::Open3 will do the same thing as open2,
    >but catches stderr also, so that's another option.
    It may be another option for someone, but not for galande. Did you read the original question? The problem was that galande is reading from the child's stdout when there is nothing there, and that causes the parent to block. Switching from Open2 to Open3 is not going to make a difference.