emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Add facility to collect stderr of async subprocess


From: Daiki Ueno
Subject: Re: [PATCH] Add facility to collect stderr of async subprocess
Date: Tue, 31 Mar 2015 16:27:10 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Hello Eli,

Eli Zaretskii <address@hidden> writes:

>> 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.

Sorry for my ignorance about Windows and thanks for writing up the
detail comment in commit 22ece83a.  It is very helpful.

> 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.

I don't get your concern here.  The above code is merely meant to pass
the actual FD of the child end of pipe, through an opaque Lisp object
`stderr'.

> Volunteers are welcome to work on this, of course.

I've just set up MSYS2 and tried the Emacs w64 build instruction[1] (and
also obtained a copy of Hart's book).  Let me try again later.

Footnotes: 
[1]  
http://sourceforge.net/p/emacsbinw64/wiki/Build%20guideline%20for%20MSYS2-MinGW-w64%20system/

Regards,
-- 
Daiki Ueno



reply via email to

[Prev in Thread] Current Thread [Next in Thread]