Subject: bin/6598: ksh can lose its editing capability if a background job reports "stopped (tty output)"
To: None <gnats-bugs@gnats.netbsd.org>
From: None <woods@mail.weird.com>
List: netbsd-bugs
Date: 12/16/1998 12:40:46
>Number:         6598
>Category:       bin
>Synopsis:       ksh can lose its editing capability if a background job reports "stopped (tty output)"
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 16 09:50:01 1998
>Last-Modified:
>Originator:     Greg A. Woods
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Release:        NetBSD-1.3.2
>Environment:

System: NetBSD most 1.3.2 NetBSD 1.3.2 (MOST) #0: Sun Sep 20 01:28:07 EDT 1998 woods@most:/usr/src-1.3.2/sys/arch/sparc/compile/MOST sparc
Shell: PD KSH v5.2.12 96/10/29

>Description:

	There seems to be a race condition somewhere in the handling of
	background jobs.  On occasion when a job reports "Stopped (tty
	output)", command line editing (in emacs mode) will be disabled,
	presumably because the tty modes are not correctly restored in
	the prompt mode.

>How-To-Repeat:

	Start ksh and put it in emacs mode (set -o emacs).
	
	Invoke then stop (with ^Z) a number of jobs that will at some
	point begin to generate output.  Then go back and put each one
	into the background.  As each is put in the background try using
	command-line editing features, such as ^P.  Perhaps this is how
	you will retrieve the previous "bg" command to edit.  At some
	point you may find that ^P is displayed instead of being acted on.

>Fix:

	unknown
>Audit-Trail:
>Unformatted: