🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #928

Re: Bug or feature?

#928
From: Jun Hamano
Date: Wed, 02 Sep 1992 05:09
21 lines
1112 bytes
In article <9208271420.AA01970.SM@odin.INS.CWRU.Edu> chet@odin.ins.cwru.edu (Chet Ramey) writes:

   > 
   >   for i in 0 1 2 3 4 5 6 7 8 9; do sleep 100; done
   > 
   > and then hit ^Z, only the sleep gets backgrounded, not the for loop.
   > Repeat the ^Z's and you end up with 10 seperate background processes.
   The BSD sh (ash) and zsh both work the same way.  ksh makes the entire
   loop unstoppable.

   Chet

If you say "for i in 0 1 2; do sleep 100; done &; fg" a ^Z stops
the whole thing.  Maybe you can add a code to place the topmost
loop into a separate process if bash is running interactively?

--
      |
   __-+-__      Jun Hamano
_-+ (\o/) +-_   junio@twinsun.com
  !   .   !
Technical Details
Message-ID: <bjwWhA{=@twinsun.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!twinsun.COM!junio
References: junio@twinsun.COM (Jun Hamano)

Show Full Headers
Complete Article Headers
Newsgroups: gnu.bash.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!twinsun.COM!junio
From: junio@twinsun.COM (Jun Hamano)
Subject: Re: Bug or feature?
Message-ID: <bjwWhA{=@twinsun.com>
Sender: gnulists@ai.mit.edu
Organization: Twin Sun, Inc.
References: junio@twinsun.COM (Jun Hamano)
Distribution: gnu
Date: Wed, 2 Sep 1992 05:09:05 GMT
Approved: bug-bash@prep.ai.mit.edu
Lines: 22