Article View: gnu.bash.bug
Article #1126Re: Stuff running in subshells can be annoying
From: Chet Ramey
Date: Wed, 10 Jan 1990 19:16
Date: Wed, 10 Jan 1990 19:16
29 lines
1487 bytes
1487 bytes
In article <ANDREWT.90Jan8091138@watnow.waterloo.edu> andrewt@watnow.waterloo.edu (Andrew Thomas) writes:
>It seems now that stuff in `` or $()
>gets run in a subshell in 1.04 where there aren't really any jobs. Is
>this fixable?
It's fixed now; it was broken in 1.03. First of all, stuff in `` or $()
always was run in a subshell. I discovered that some bugs we were finding
were caused by the fact that subshells retained the same `jobs' structure
as their parent. Consider the following case:
foo()
{
more $*
}
history | foo
will always hang because the subshell started to process `foo' is not the
parent of the jobs in the job list it inherited from its parent, and it
will never get the SIGCHLD signals necessary to flush them out. It was
best to simply delete the jobs that were no longer children of the subshell.
Chet Ramey
--
Chet Ramey
Network Services Group "Help! Help! I'm being
Case Western Reserve University repressed!"
chet@ins.CWRU.Edu
Technical Details
Message-ID:
<1990Jan10.191651.6471@usenet.ins.cwru.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!umich!samsung!usc!cs.utexas.edu!tut.cis.ohio-state.edu!usenet.ins.cwru.edu!cwns1!chetReferences:
<ANDREWT.90Jan8091138@watnow.waterloo.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!umich!samsung!usc!cs.utexas.edu!tut.cis.ohio-state.edu!usenet.ins.cwru.edu!cwns1!chet From: chet@cwns1.CWRU.EDU (Chet Ramey) Newsgroups: gnu.bash.bug Subject: Re: Stuff running in subshells can be annoying Message-ID: <1990Jan10.191651.6471@usenet.ins.cwru.edu> Date: 10 Jan 90 19:16:51 GMT References: <ANDREWT.90Jan8091138@watnow.waterloo.edu> Organization: Case Western Reserve Univ. Cleveland, Ohio, (USA) Lines: 29