bug-bash
[Top][All Lists]
Advanced

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

Re: bash 4.4 messed up input with certain background processes


From: Chet Ramey
Subject: Re: bash 4.4 messed up input with certain background processes
Date: Thu, 30 Jun 2016 14:53:09 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

On 6/29/16 11:22 PM, Grisha Levit wrote:
> Thanks, the -n option does work around this.
> I was very surprised to see input going to a backgrounded process 

You shouldn't be.  When job control is active, bash doesn't modify the
standard input of any background process it starts, in case the job gets
moved to the foreground.  Any process can catch SIGTTIN and retry the
read and take its chances; read is defined to return EINTR for background
proccesses only if SIGTTIN is ignored or blocked.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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