[comp.sys.sun] Bad interaction between dbxtool and tcsh

roy@uunet.uu.net (Roy Smith) (01/18/89)

We just started running tcsh (5.9 beta 1 (Ohio State) 11/10/88 Patch level
0) a couple of weeks ago.  It seems to work just fine but today I noticed
that if I run dbxtool from tcsh, I don't get any echo in the dbx command
window, even though my commands are executed and dbx output comes up in
the window.  If I run a csh subshell and then run dbxtool from there, it
works fine.  Any ideas?

Roy Smith, System Administrator
Public Health Research Institute
{allegra,philabs,cmcl2,rutgers}!phri!roy -or- phri!roy@uunet.uu.net

richard%aiai.edinburgh.ac.uk@nss.cs.ucl.ac.uk (Richard Tobin) (01/26/89)

[problem: dbxtool from tcsh doesn't echo]

It's probably in cbreak mode as well.  A common problem with programs that
include some kind of terminal emulator is that they decide what modes to
run their pseudo-terminal in by looking at the modes of their own control
terminal.  (A good idea in principle, since it allows them to get your
suspend/eof/erase characters right.)

Various shells run in no-echo and cbreak modes so that they can do
interesting line editing.  They set the modes back before running a
program in the foreground, but not before running one in the background.
Thus I conclude that you are running dbxtool in the background.

Possible solutions:

(1) Run it in the foreground.  This ties up your shelltool.
(2) Start it in the foreground, suspend it and put it in the background,
    Unfortunately dbxtool appears to ignore SIGTSTP so you'll have to do
    "kill -STOP pid" from another window.
(3) Start it from the background menu.  Then you have to cd to the right
    directory and say 'debug program'.
(4) Type "dbxtool & sleep 2", or something similar.  The idea is that tcsh
    will be waiting for sleep (with the terminal modes normal) when dbxtool
    looks at the modes.  This isn't guaranteed to work, because the timing
    is not reliable.

-- Richard