[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add facility to collect stderr of async subprocess
From: |
Eli Zaretskii |
Subject: |
Re: [PATCH] Add facility to collect stderr of async subprocess |
Date: |
Wed, 18 Mar 2015 18:25:34 +0200 |
> From: Daiki Ueno <address@hidden>
> Date: Wed, 18 Mar 2015 16:37:08 +0900
>
> >> In any case, supporting stderr could be a starting point, as it seems to
> >> be a long-standing request:
> >> https://lists.gnu.org/archive/html/emacs-devel/2004-04/msg01051.html
> >> and it wouldn't involve a portability issue.
> >
> > Redirecting the child's stderr is already supported on Windows, so
> > this is only a matter of having the higher layers DTRT.
>
> So, let's start with small (but common) things. The attached patch adds
> a new keyword `:stderr' to `make-process'. The argument can be either a
> buffer or a (newly introduced) pipe process.
Do you expect this to work on Windows? If so, then there's at least
some part of "having higher layers DTRT" I failed to adequately
explain ;-)
Redirection of stderr does indeed work on the lowest level of creating
subprocesses on MS-Windows, but we don't expect to read from a pipe
connected to child's stderr, and thus the 'pselect' emulation watches
only one file handle per sub-process. This needs to be expanded.
In addition, this:
> (let ((stderr (make-pipe-process :name "stderr")))
> (make-process :name "test"
> :buffer (current-buffer)
> :command (list (expand-file-name "./test.sh"))
> :stderr stderr)
> (set-process-filter stderr ...))
introduces a new concept whereby a process object ('stderr' in this
case) can be passed to another subprocess, which AFAIK was not
possible until now, at least not on MS-Windows.
Volunteers are welcome to work on this, of course.
- Re: [PATCH] Generalize start-process with keyword args, (continued)
- Re: [PATCH] Generalize start-process with keyword args, Stefan Monnier, 2015/03/16
- Re: [PATCH] Generalize start-process with keyword args, Daiki Ueno, 2015/03/16
- Re: [PATCH] Generalize start-process with keyword args, Stefan Monnier, 2015/03/17
- Re: [PATCH] Generalize start-process with keyword args, Eli Zaretskii, 2015/03/17
- Re: [PATCH] Generalize start-process with keyword args, Stefan Monnier, 2015/03/17
- Re: [PATCH] Generalize start-process with keyword args, Eli Zaretskii, 2015/03/17
- Re: [PATCH] Generalize start-process with keyword args, Stefan Monnier, 2015/03/17
- Re: [PATCH] Generalize start-process with keyword args, Eli Zaretskii, 2015/03/17
- Re: [PATCH] Generalize start-process with keyword args, Daiki Ueno, 2015/03/18
- [PATCH] Add facility to collect stderr of async subprocess, Daiki Ueno, 2015/03/18
- Re: [PATCH] Add facility to collect stderr of async subprocess,
Eli Zaretskii <=
- Re: [PATCH] Add facility to collect stderr of async subprocess, Daiki Ueno, 2015/03/31
- Re: [PATCH] Add facility to collect stderr of async subprocess, Eli Zaretskii, 2015/03/31
- Re: [PATCH] Generalize start-process with keyword args, Stefan Monnier, 2015/03/18
- Re: [PATCH] Generalize start-process with keyword args, Eli Zaretskii, 2015/03/18
- Re: [PATCH] Generalize start-process with keyword args, Daiki Ueno, 2015/03/19
- Re: [PATCH] Generalize start-process with keyword args, Stefan Monnier, 2015/03/19
- Re: [PATCH] Generalize start-process with keyword args, Daiki Ueno, 2015/03/23
- Re: [PATCH] Generalize start-process with keyword args, Eli Zaretskii, 2015/03/18
- Re: [PATCH] Generalize start-process with keyword args, Stefan Monnier, 2015/03/18
- Re: [PATCH] Generalize start-process with keyword args, Eli Zaretskii, 2015/03/18