Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 May 1996 01:45:24 +0200
From:      hohmuth@inf.tu-dresden.de
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/1206: /bin/sh + emacs + ^G = ruined terminal
Message-ID:  <199605152345.BAA07453@irs201.inf.tu-dresden.de>
Resent-Message-ID: <199605152350.QAA04343@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         1206
>Category:       bin
>Synopsis:       /bin/sh + emacs + ^G = ruined terminal
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 15 16:50:01 PDT 1996
>Last-Modified:
>Originator:     Michael Hohmuth
>Organization:
Dept. of Computer Science, TU Dresden, Germany
>Release:        FreeBSD 2.1.0-RELEASE i386
>Environment:

olymp:~> uname -a 
FreeBSD olymp.inf.tu-dresden.de 2.1.0-RELEASE FreeBSD 2.1.0-RELEASE #0: Thu May  2 13:18:23 MET DST 1996     root@olymp.inf.tu-dresden.de:/usr/src/sys/compile/OLYMP  i386

olymp:~> printenv
TERM=vt100
HOME=/home/hohmuth
SHELL=/usr/local/bin/tcsh
LOGNAME=hohmuth
USER=hohmuth
PATH=/home/hohmuth/local/setup/site/other/host/olymp/bin:/home/hohmuth/local/setup/bin:/home/hohmuth/local/bin:/usr/local/bin:/usr/X11R6/bin:/usr/bin:/bin:/usr/games:.
HOSTTYPE=FreeBSD
VENDOR=intel
OSTYPE=FreeBSD
MACHTYPE=i386
SHLVL=1
PWD=/home/hohmuth
GROUP=staff
HOST=olymp.inf.tu-dresden.de

olymp:~> stty
speed 9600 baud;
lflags: echoe echoke echoctl tostop pendin
oflags: -oxtabs
cflags: cs8 -parenb

Using Emacs-19.29 from the packages collection.

>Description:

When starting emacs though a /bin/sh script, and then typing ^G,
thereby generating a QUIT signal to the terminal (I believe), this
signal is being interpreted by the shell (even though emacs should
have established its own terminal session).  The shell will exit and
leave emacs running in the background.

Emacs will still access the terminal (writing "Garbage
collecting...done" messages to it), but can't any longer be controlled
through it.

>How-To-Repeat:

    > tcsh				# don't try this from within 
					# /bin/sh, this will leave
					# your terminal in an unusable
					# state
					
    tcsh% mv .emacs foo			# move .emacs out of the way
    tcsh% /bin/sh -c emacs		# start up emacs through /bin/sh

Now, within emacs, type ^G (this normally invokes the emacs function
"keyboard-quit").

This will make the tcsh prompt appear again; this should not have
happened.  The terminal will now be in some funny state:  Emacs is
still running on it (not suspended) and will sometimes print its
"Garbage collecting...done" messages to it.  It is impossible to
re-attach to emacs by means of "fg".

The following commands don't produce the erratic behaviour:

-   /bin/sh
    emacs

-   emacs				# from any shell

-   /bin/csh -c emacs

>Fix:
	
	
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605152345.BAA07453>