[comp.windows.x] Color Xterm crashes on input to parent csh or tcsh? / termcap.

harp@Pkg.Mcc.COM (Christopher North-Keys) (09/25/90)

Handy termcap trick, change the "so" and "su" as follows for an apparently
compatible way to use color in the color version while leaving the monochrome
version unmolested:

	:so=\E[33m\E[5m:se=\E[m:us=\E[36m\E[4m:ue=\E[m:

Context:  Sun 3/150 SunOS 4.0.3 color

Ex 1

}-4.181-> csh
Cshrc.v29 aliases interface terra.pkg.mcc.com:0.0 X11R4 session .
}-5.12-> ./xterm &
[1] 16191                       /* hit return after new window appears */
}-5.13->
Reset tty pgrp from 16192 to 16188
[1]    Done                 ./xterm
}-5.13->

Ex 2

}-4.182-> tcsh
Cshrc.v29 aliases interface terra.pkg.mcc.com:0.0 X11R4 session .
}-5.13-> ./xterm &
[1] 16202                       /* striking return in parent crashes child */
}-5.14-> GetNextChar(): just saw end of file, errno == 5
Reset tty pgrp from 16207 to 16199
}-5.14->
[1]    Done                 ./xterm
}-5.14->

This same effect was noted upon typing control-d into the color xterm window
directly.

Ex 3

}-5.14-> < /dev/null ./xterm &
[1] 16214
}-5.15->                       /* striking return now does *not* crash child */
}-5.15->
}-5.15->


The standard Xterm does not have this problem.  This difference prevents my
substitution of the color version for the monochrome version (despite its
being very spiffy).  Anyone know how to fix it (or even what's wrong)?
--
______________________________________________________________________________
Christopher Alex.North-Keys                          Associate Systems Analyst
Group Talisman                                                  Harp[@Mcc.Com]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

jim@baroque.Stanford.EDU (James Helman) (09/26/90)

The problem is with tty process groups.  xterm/main.c is a minefield.

I've found the same problem on Sun-3's under SunOS 4.0.3 and Vaxen
under Ultrix V3.0.

It works fine on Sun-4's under SunOS 4.1.

Color xterm also works under IRIX 3.3 on SGI machines, but you need to
add a flag to the Imakefile to turn on some code in main.c to
workaround a kernel bug.  I've made this change to the Imakefile in
the version on fresnel.stanford.edu in pub/4DX, but the workaround
only applies to IRIX, and may not be necessary under 3.3.1

I don't know about other arch's and OS's.

Jim Helman
Department of Applied Physics			Durand 012
Stanford University				FAX: (415) 725-3377
(jim@KAOS.stanford.edu) 			Work: (415) 723-9127