[comp.windows.x] M-x shell problem in emacs running under x11r4

katz@elements.rpal.com (Morry Katz) (10/18/90)

System: Sun 4
OS: 4.1
X release: x114r
Emacs release: 18.55

The problem is that when I start an X based emacs window from my
.xsession file or from a menu entry, the emacs that comes up works
completely correctly except that M-x shell fails with the error
message "Process shell stopped (tty input)".  When I check the process
status with ps, I find that in fact a csh process has been created
which is stuck in the tty input wait state.  If I set
"explicit-shell-file-name" in emacs to be sh instead of csh then M-x
shell works correctly.  Interestingly enough, if I try and run csh
from this Bourne shell, the csh hangs in the same type of tty input
wait state.  If I run emacs from an xterm or outside of X the problem
does not appear.

I have checked the values of all of the shell and environment
variables and they are set to the same values by xterm and in my
.xsession file.  The only thing that I can think of is that emacs is
somehow sensative to the process group of the emacs or its parent
process.  

If you have any idea what is going on, please send me email as I do
not normally read this news group.  Thank you very much for your
help!!!!  I am completely stumped and can't figure out any way to even
use a debugger to trace this problem.
--
-------------------------------------------------------------------------------
Morry Katz
Rockwell Science Center
administrator@rpal.com (machine administration issues)
katz@rpal.com (other)
-------------------------------------------------------------------------------

jbw@bucsf.bu.edu (Joe Wells) (10/19/90)

In article <KATZ.90Oct17153544@carbon.elements.rpal.com> katz@elements.rpal.com (Morry Katz) writes:

   The problem is that when I start an X based emacs window from my
   .xsession file or from a menu entry, the emacs that comes up works
   completely correctly except that M-x shell fails with the error
   message "Process shell stopped (tty input)".

   [lots more details deleted]

POSIX job control was introduced in SunOS 4.1.  You can read more about
this in the release notes.  A temporary workaround to the problem with
Emacs is to run "/usr/etc/setsid emacs" instead of just "emacs".  There is
also a patch to Emacs to make it work with POSIX job control.

Enjoy,

-- 
Joe Wells <jbw@bu.edu>