Is typeahead loss a generic ksh problem?
Arthur David Olson
ado at elsie.UUCP
Fri May 20 07:58:11 AEST 1988
Thanks to everyone who replied to the original posting. The problem turned
out to be that if you run a command such as
( sleep 5 ; echo hi ) | exit
the "echo hi" is terminated by a SIGPIPE signal. Ksh (or at least the version
of ksh in use at elsie) waits for all elements of a pipeline to complete
before prompting again. It noticed that the SIGPIPE death had occurred,
and assumed (in "reset_ttygrp", for those keeping score) that some tty cleanup
should be done.
The fix (in "await") was to change a
reset_ttygrp(pw,w&LOBYTE);
call to
if ((w&LOBYTE)==SIGPIPE)
reset_ttygrp(pw,0);
else reset_ttygrp(pw,w&LOBYTE);
--
Canada's program is to spaceflight as the carrier pigeon is to mail.
ado at ncifcrf.gov ADO is a trademark of Ampex.
More information about the Comp.unix.questions
mailing list