Subject: bin/6598: ksh can lose its editing capability if a background job reports "stopped (tty output)"
To: None <email@example.com>
From: None <firstname.lastname@example.org>
Date: 12/16/1998 12:40:46
>Synopsis: ksh can lose its editing capability if a background job reports "stopped (tty output)"
>Responsible: bin-bug-people (Utility Bug People)
>Arrival-Date: Wed Dec 16 09:50:01 1998
>Originator: Greg A. Woods
Planix, Inc.; Toronto, Ontario; Canada
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
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.
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.