[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Redirecting standard output
From: |
Davis Herring |
Subject: |
Re: Redirecting standard output |
Date: |
Thu, 21 Apr 2011 13:19:36 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101220 Lanikai/3.1.7 |
>>> On Posix systems, we use a pipe to read from subprocess's STDOUT. You
>>> cannot do the same with STDERR, but you can redirect STDERR to a
>>> temporary file, and then read it when the subprocess exits.
>>
>> That is news to me. I've redirected STDERR to a pipe many times in other
>> programs. Why can't it be done in Emacs?
>
> Maybe I'm missing something, but the call to `pipe' produces only 2
> file descriptors on each end. So you can have either stdout or stderr
> of the subprocess, or both of them together, but not both of them
> separately.
You can call `pipe' more than once; the trouble comes when you have to
choose which one to read from to avoid blocking the process. Probably
it's just that no one has bothered to implement it carefully enough with
`select' or so.
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
- Re: Redirecting standard output, (continued)
- Re: Redirecting standard output, Lars Magne Ingebrigtsen, 2011/04/21
- Re: Redirecting standard output, Eli Zaretskii, 2011/04/21
- Re: Redirecting standard output, Lars Magne Ingebrigtsen, 2011/04/21
- Re: Redirecting standard output, Lars Magne Ingebrigtsen, 2011/04/21
- Re: Redirecting standard output, Eli Zaretskii, 2011/04/21
- Re: Redirecting standard output, Lars Magne Ingebrigtsen, 2011/04/21
- Re: Redirecting standard output, Lars Magne Ingebrigtsen, 2011/04/21
- Re: Redirecting standard output, Eli Zaretskii, 2011/04/21
- Re: Redirecting standard output, Jan Djärv, 2011/04/21
- Re: Redirecting standard output, Eli Zaretskii, 2011/04/21
- Re: Redirecting standard output,
Davis Herring <=
- Re: Redirecting standard output, Lars Magne Ingebrigtsen, 2011/04/21
- Re: Redirecting standard output, Eli Zaretskii, 2011/04/22
- Re: Redirecting standard output, Lars Magne Ingebrigtsen, 2011/04/23
- Re: Redirecting standard output, Eli Zaretskii, 2011/04/23
- Re: Redirecting standard output, Jan Djärv, 2011/04/24
- Re: Redirecting standard output, Lars Magne Ingebrigtsen, 2011/04/30
- Re: Redirecting standard output, Lars Magne Ingebrigtsen, 2011/04/30
- Re: Redirecting standard output, Glenn Morris, 2011/04/21
Re: Redirecting standard output, Michael Albinus, 2011/04/21
Re: Redirecting standard output, Eli Zaretskii, 2011/04/21