bug-bash
[Top][All Lists]
Advanced

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

Re: Unexpected exit


From: Chet Ramey
Subject: Re: Unexpected exit
Date: Mon, 25 Apr 2016 15:44:28 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

On 4/25/16 11:05 AM, Paulo Bardes wrote:
> I came about this weird behavior when comparing some test cases I wrote for a
> little shell I made for a CS class. Here's the thing:
> 
> $ echo | echo $(sleep 5) # ^Z and then bg to reproduce
> 
> If you just let it run everything is fine, but the weird thing is when you 
> stop
> it and resume in background bash will quit when the command finishes. I'm not
> sure whether thats a bug or if I'm missing something. Just in case I'm sharing
> my findings...

Thanks for the report.  The problem is that the shell started to run the
command substitution tries to give the terminal back to the (defunct)
pipeline process group, even though it's now running in the background and
exiting.  The fix will be in the next release of bash.

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/



reply via email to

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