On 1/11/16 11:37 AM, Andreas Schwab wrote:
> Chet Ramey <[email protected]> writes:
>
>> On 1/10/16 12:54 PM, Piotr Grzybowski wrote:
>>> hey,
>>>
>>> I am quite sure it happens here (devel branch, at
>>> 6f82653c5ef09aeeeba4376a1c65ce86c3605c00):
>>>
>>> execute_cmd.c +5115:
>>> if ((cmdflags & CMD_STDIN_REDIR) &&
>>> pipe_in == NO_PIPE &&
>>> (stdin_redirects (redirects) == 0))
>>> async_redirect_stdin ();
>>>
>>> but after reading the comments some 3.5k lines earlier I am not sure
>>> how to fix it; of course commenting out the if in
>>> execute_cmd.c:5112-5115 solves it, but who can tell what it breaks?
>>
>> Posix requires this behavior:
>>
>> "The standard input for an asynchronous list, before any explicit
>> redirections are performed, shall be considered to be assigned to a file
>> that has the same properties as /dev/null."
>
> But isn't it a bug that subsequent asynchronous commands in the list are
> not redirected from /dev/null?
Yes, clearly the existing behavior is inconsistent. My response answered
Piotr's question about what it breaks.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/