[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Redirecting standard output
From: |
Eli Zaretskii |
Subject: |
Re: Redirecting standard output |
Date: |
Fri, 22 Apr 2011 01:50:47 -0400 |
> From: Lars Magne Ingebrigtsen <address@hidden>
> Date: Thu, 21 Apr 2011 21:31:58 +0200
>
> Davis Herring <address@hidden> writes:
>
> > 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.
>
> Oh, I see... I was a bit confused about how pipe worked. Yes, that
> makes sense. Just hook up the STDERR endpoint to a pipe, too, and
> you're in business.
>
> For the MSDOS case (with STDERR-to-buffer), we'd just have to open
> another temp file, just like we do with STDOUT, so that's a very minor
> change.
>
> For the non-MSDOS case, using two pipes and select shouldn't be too
> difficult to implement, I think?
You are in danger of reinventing the wait_reading_process_output
wheel. I'm not sure that kind of complexity is justified for such a
marginal need, just for the sake of theoretical completeness and/or
symmetry between stdout and stderr. I think redirecting to a
temporary file and then reading from there is more than adequate, and
all but indistinguishable from the user POV (since we wait for the
process to exit anyway).
> Or are there gotchas when using select in Emacs?
wait_reading_process_output already uses select, so adding another one
is probably not a good idea.
- Re: Redirecting standard output, (continued)
- 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, 2011/04/21
- Re: Redirecting standard output, Lars Magne Ingebrigtsen, 2011/04/21
- Re: Redirecting standard output,
Eli Zaretskii <=
- 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