[Top][All Lists]

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

Re: implicit redirection of background within pipeline

From: Andreas Schwab
Subject: Re: implicit redirection of background within pipeline
Date: Mon, 11 Jan 2016 17:37:52 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Chet Ramey <address@hidden> 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?


Andreas Schwab, SUSE Labs, address@hidden
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

reply via email to

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