Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #11882
| Path | csiph.com!xmission!news.glorb.com!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Chet Ramey <chet.ramey@case.edu> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: Script shell suspends after executing second child process |
| Date | Sat, 14 Nov 2015 21:34:35 -0500 |
| Organization | ITS, Case Western Reserve University |
| Lines | 77 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.2349.1447656359.7904.bug-bash@gnu.org> (permalink) |
| References | <CAJnmqwaW1OfDEwVe9BybW-LP-=-Jr=N83S-xboZYDb5yvQ+cbw@mail.gmail.com> <5644F35F.2050507@case.edu> <CAJnmqwZy0JW_f5NXjQpqT7p=DYjZ=ud4JM3UR+_GqnKPtKk0Dw@mail.gmail.com> <5647BD8A.8060305@case.edu> |
| Reply-To | chet.ramey@case.edu |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | multipart/mixed; boundary="------------080003090104080500010202" |
| X-Trace | usenet.stanford.edu 1447656359 4706 208.118.235.17 (16 Nov 2015 06:45:59 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| Cc | bug-bash <bug-bash@gnu.org>, chet.ramey@case.edu |
| To | konsolebox <konsolebox@gmail.com> |
| Envelope-to | bug-bash@gnu.org |
| User-Agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
| In-Reply-To | <5647BD8A.8060305@case.edu> |
| X-Mirapoint-Virus-RAPID-Raw | score=unknown(0), refid=str=0001.0A020202.5647EF3C.00AF,ss=1,re=0.000,fgs=0, ip=173.191.69.108, so=2015-08-12 04:07:17, dmn=2011-05-27 18:58:46 |
| X-Mirapoint-Loop-Id | 106e8923704280ed3ef3171cebed4a2a |
| X-Junkmail-Whitelist | YES (by domain whitelist at mpv2-2015.case.edu) |
| X-Mirapoint-Virus-RAPID-Raw | score=unknown(0), refid=str=0001.0A020203.5647EF3C.00F4,ss=1,re=0.000,fgs=0, ip=173.191.69.108, so=2015-08-12 04:07:17, dmn=2011-05-27 18:58:46 |
| X-Mirapoint-Loop-Id | fef3fc56237bd7e5e8475707eb63c0b6 |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] |
| X-Received-From | 129.22.103.227 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.14 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-bash> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| Xref | csiph.com gnu.bash.bug:11882 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On 11/14/15 6:02 PM, Chet Ramey wrote:
> On 11/14/15 12:39 PM, konsolebox wrote:
>> On Fri, Nov 13, 2015 at 4:15 AM, Chet Ramey <chet.ramey@case.edu> wrote:
>>> On 11/12/15 5:27 AM, konsolebox wrote:
>>>> My interactive (using `read`) Bash-script application still suspends
>>>> itself after
>>>> executing second instance of a player. I've only seen this happen in
>>>> the newest development version of Bash.
>>>
>>> According to the change log, the last time I made a change that might
>>> be relevant to this problem was April 23. You might try getting the
>>> version immediately preceding that one and seeing whether or not that
>>> version has the problem.
>>>
>>
>> This seems to be the modification that causes the problem. It's in
>> "commit bash-20150424 snapshot".
>>
>> --- a/jobs.c
>> +++ b/jobs.c
>> @@ -2658,8 +2658,8 @@ itrace("wait_for: blocking wait for %d returns
>> %d child = %p", (int)pid, r, chil
>> if (job == NO_JOB)
>> itrace("wait_for: job == NO_JOB, giving the terminal to shell_pgrp
>> (%ld)", (long)shell_pgrp);
>> #endif
>> - /* Don't modify terminal pgrp if we are running in the background */
>> - if (running_in_background == 0)
>> + /* Don't modify terminal pgrp if we are running in background
>> or a subshell */
>> + if (running_in_background == 0 && subshell_environment == 0)
>> give_terminal_to (shell_pgrp, 0);
>> }
>>
Here, try this patch. It sort of splits the difference along the lines of
your suggestion, and it behaves correctly for the case that inspired the
change originally.
Chet
--
``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/
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: Script shell suspends after executing second child process Chet Ramey <chet.ramey@case.edu> - 2015-11-14 21:34 -0500
csiph-web