in reply to Re: Hanging when reading from pipe-y open
in thread Hanging when reading from pipe-y open

Thanks. What I don't understand is if the shell can see (some of) of the output before the program closes its output stream (or not, as the case may be), why I can't similarly access the IO stream so far in perl. For good measure, the -N argument is supposed to make curl not buffer its output.

As you suggest, I would much prefer to use LWP and Crypt::SSLeay, but am temporarily blocked by, erm, human factors, in the shape of a intemperate sysadmin.

Thanks

  • Comment on Re: Re: Hanging when reading from pipe-y open

Replies are listed 'Best First'.
Re: Hanging when reading from pipe-y open
by Abigail-II (Bishop) on Mar 30, 2004 at 13:11 UTC
    Well the -N might cause curl not to buffer its output, the shell may. Try removing the quotes, that ought to cause Perl to exec() curl directly instead of passing it off to the shell. I can't remember on top of my head whether unblocking mode of file descriptors gets inherited after fork and exec, but you may want to set $| = 1 before your open.

    Abigail