[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, 08 Apr 2015 08:56:17 +0300 |
> From: Daiki Ueno <address@hidden>
> Cc: address@hidden
> Date: Wed, 08 Apr 2015 09:21:28 +0900
>
> Eli Zaretskii <address@hidden> writes:
>
> > However, please note that the call to emacs_pipe2 in make-pipe-process
> > will hit an assertion in w32.c's implementation of pipe2.
>
> OK, I added a wrapper around pipe2 in w32.c to preserve the assert
> condition. With the attached patch, I confirmed that the included test
> passes on both Windows and GNU/Linux.
Thanks.
However, I think this is not the right solution. The assertion is
there because w32.c:pipe2 calls _pipe with two flags, _O_BINARY and
_O_NOINHERIT, which exactly correspond to the flags being tested by
the assertion. To support different combinations of flags, the flags
passed to _pipe need to be computed dynamically based on the argument
passed to pipe2. By contrast, with your wrapper, the pipe will always
be closed in the subprocess, which I think is not what we want (does
the test actually test this aspect?), and is at least confusing when
reading the source (a.k.a. "looks like a bug").
> - Add a new function 'pipe_open' analogous to 'serial_open', which has
> different definitions on Windows and on GNU/Linux
The sysdep.c definition of pipe_open is for all Posix platforms, I
think, not just for GNU/Linux.
- Re: [PATCH] Add facility to collect stderr of async subprocess, Daiki Ueno, 2015/04/07
- Re: [PATCH] Add facility to collect stderr of async subprocess, Paul Eggert, 2015/04/07
- Re: [PATCH] Add facility to collect stderr of async subprocess, Daiki Ueno, 2015/04/07
- Re: [PATCH] Add facility to collect stderr of async subprocess, Eli Zaretskii, 2015/04/08
- Re: [PATCH] Add facility to collect stderr of async subprocess, Eli Zaretskii, 2015/04/08
- Re: [PATCH] Add facility to collect stderr of async subprocess, Daiki Ueno, 2015/04/08
- Re: [PATCH] Add facility to collect stderr of async subprocess, Daiki Ueno, 2015/04/10
- Re: [PATCH] Add facility to collect stderr of async subprocess, Ted Zlatanov, 2015/04/18
Re: [PATCH] Add facility to collect stderr of async subprocess,
Eli Zaretskii <=