Bug 12877

Summary: interactive /bin/sh ignores ^C and ^Z in while loops
Product: Base System Reporter: rdm <rdm>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description rdm 1999-07-30 02:30:00 UTC
If I type a while loop into sh, then try to ^C or ^Z out, the shell
refuses to go away.  FWIW, the session below is being run in a telnet
window from a Mac, using tcsh as the login shell, but folks on other
systems have replicated the problem.  The bug is present in both
FreeBSD 2.2.8 and 3.2.

How-To-Repeat:   % sh
  $ while :; do
  > echo foo
  > sleep 60
  > done
  foo

  [Interrupt Process]		<- ^C hit

  [Interrupt Process]		<- ^C hit

  ^Z%1 Suspended		<- ^Z hit
  foo

  ^Z%2 Suspended		<- ^Z hit
  foo
Comment 1 Thomas David Rivers 1999-07-30 02:56:46 UTC
I believe this is the same as PR bin/9173 - submitted last Dec.

Is that the case?

	- Dave Rivers -
Comment 2 matt 1999-08-01 17:18:41 UTC
This activity occurs on 3.1 as well, but does not occur on 2.2.7, or
4.0-current (April 99).

--
Matthew Emmerton      || http://www.gsicomp.on.ca
GSI Computer Services || P: +1 (800) 217-5409 (Canada)
Technical Director    || F: +1 (519) 335-6584
Comment 3 Martin Cracauer freebsd_committer freebsd_triage 1999-08-10 14:22:54 UTC
State Changed
From-To: open->closed

I committed a fix to these problems on 1999/04/03 to -current and 
1999/07/25 to -stable.