Jorge Acereda | 26 May 2012 01:55
Picon

Reading from stderr

Hi,

I'm trying to figure out how to capture the standard error of a piped process without resorting to forking an
additional sh process.
Any hint?

Thanks in advance,
  Jorge

Alexander Burger | 26 May 2012 08:55
Picon

Re: Reading from stderr

Hi Jorge,

> I'm trying to figure out how to capture the standard error of a piped
> process without resorting to forking an additional sh process.

If it is enough to redirect it to a file, you might enclose the pipe
call with 'err'. The following appends the message to "error.log":

   (err "+error.log"
      (in '(ls "doesntexit") (line)) )

Cheers,
- Alex

Gmane