home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / gnu / bash / bug / 588 < prev    next >
Encoding:
Text File  |  1992-09-02  |  1.1 KB  |  36 lines

  1. Newsgroups: gnu.bash.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!twinsun.COM!junio
  3. From: junio@twinsun.COM (Jun Hamano)
  4. Subject: Re: Bug or feature?
  5. Message-ID: <bjwWoknY@twinsun.com>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: Twin Sun, Inc.
  8. References: junio@twinsun.COM (Jun Hamano)
  9. Distribution: gnu
  10. Date: Wed, 2 Sep 1992 05:10:51 GMT
  11. Approved: bug-bash@prep.ai.mit.edu
  12. Lines: 22
  13.  
  14. In article <9208271420.AA01970.SM@odin.INS.CWRU.Edu> chet@odin.ins.cwru.edu (Chet Ramey) writes:
  15.  
  16.    > 
  17.    >   for i in 0 1 2 3 4 5 6 7 8 9; do sleep 100; done
  18.    > 
  19.    > and then hit ^Z, only the sleep gets backgrounded, not the for loop.
  20.    > Repeat the ^Z's and you end up with 10 seperate background processes.
  21.    The BSD sh (ash) and zsh both work the same way.  ksh makes the entire
  22.    loop unstoppable.
  23.  
  24.    Chet
  25.  
  26. If you say "for i in 0 1 2; do sleep 100; done &; fg" a ^Z stops
  27. the whole thing.  Maybe you can add a code to place the topmost
  28. loop into a separate process if bash is running interactively?
  29.  
  30. --
  31.       |
  32.    __-+-__      Jun Hamano
  33. _-+ (\o/) +-_   junio@twinsun.com
  34.   !   .   !
  35.  
  36.