[gnu.emacs.bug] emacs hangs when invoke from a subshell

eric@mks.com (Eric Gisin) (12/01/89)

When the process group id is not equal to the process id
on BSD, the SIGIO signals do not get sent to emacs and it hangs.
This happens if your shell does not have job control,
or a sub-shell invokes emacs.

A quick hack is to write a front end to emacs:
main(argc, argv) {
	/* set process group to process id */
	setpgrp(0, getpgrp(0));
	execl(real_emacs, argv);
}

You can also put the setpgrp in emacs' startup
(I'm not sure if this breaks anything).

wjc@ho5cad.ATT.COM (Bill Carpenter) (12/01/89)

On 1 Dec 89 01:18:23 GMT, eric@mks.com (Eric Gisin) said:

eric> When the process group id is not equal to the process id
eric> on BSD, the SIGIO signals do not get sent to emacs and it hangs.
eric> This happens if your shell does not have job control,
eric> or a sub-shell invokes emacs.

That probably explains why I don't have this problem.  The original
poster was running GNUemacs 18.55 on a Sun4 with SunOS 4.0.3.  Same
here, but we don't have the hanging subshell problem (we did in the
earlier release ... 18.52 or 18.53).

The difference is probably that our GNUemacs was built under the SysV
emulation environment, which I expect the majority of SUN users don't
use.  One of the things that is quite different under two compilation
environments is some aspects of signal handling.

[Note:  I'm not particularly advocating the SysV emulation stuff.  It
just happens to be what we use for our regular stuff around here.  It
didn't seem to break GNUemacs, so I never bothered to build it the BSD
way.]
--
   Bill Carpenter         att!ho5cad!wjc  or  attmail!bill