jeff@cjsa.wa.com (Jeffery Small) (11/29/89)
A while ago, I reported a problem I was having with ksh running under SunOS: > The problem that I have found is that if I launch a process from ksh, > placing it in the background with '&', the stty values are not being > properly set. This becomes a problem when interactive processes > (including another ksh) are spawned. > > Specifically, what happens is that -icanon and -echo are set (should be > icanon and echo) and eof is left undefined (should be set to ^D). This turns out to be a general problem experienced at a number of sites. I would like to thank both Guy Harris and David Korn who responded with very similar detailed explanations of what is causing this behavior. This is not a 'bug' per se in either ksh or sunview, but is the result of these two programs interacting with one another. From: David Korn <hector!dgk> > The problem is cause by timing. When you use an edit mode (and I assume > that you were using either emacs, or viraw) ksh puts the terminal > into raw mode. It restores the terminal when it runs each command. > The shelltool command, must copy the terminal settings in the > new window when it starts up. Thus, there is a race condition between > ksh and shelltool. If ksh goes back into raw mode before shelltool > reads the terminal settings the window goes into raw mode. As for a workaround to this situation, Steve Losen (scl@virginia.edu) suggested adding the command: stty sane 2>/dev/null to the $ENV file. This does solve the problem at the expense of having to execute 'stty' upon each invocation of the shell, but seemed like the best solution for my particular circumstances. Jeff Small C. Jeffery Small & Associates (206) 485-5596 uunet!nwnexus!cjsa!jeff 19112 152nd Avenue NE, Woodinville, WA 98072