disabling TIOCGPGRP on pty master sides
Sean Eric Fagan
sef at kithrup.COM
Sat Dec 15 06:52:18 AEST 1990
Submitted-by: sef at kithrup.COM (Sean Eric Fagan)
In article <15827 at cs.utexas.edu> nix%valis.asd.sgi.com at SGI.COM (Insufficient Dada) writes:
>This behavior breaks
>the subshell handling of GNU Emacs, and apparently interferes with the
>operation of the XView terminal emulator as well.
First of all, emacs needs to do a setsid() in the sub-process; this makes
the pty it's controlling terminal (at least, this is how it works under
SCO's unix).
Second of all, because of the problem with tcgetpgrp() on another process'
pty, I added (for my own use) a new ioctl to the pty driver, called TIOCSIG
(as in, ioctl(fd, TIOCSIG, signo)), which sends an arbitray signal to the
process group on fd. (Since I did it only for emacs, I didn't put in any
checks for security, although I plan on doing so eventually.)
I got this idea from a discussion with people at Berkeley.
--
Sean Eric Fagan | "I made the universe, but please don't blame me for it;
sef at kithrup.COM | I had a bellyache at the time."
-----------------+ -- The Turtle (Stephen King, _It_)
Any opinions expressed are my own, and generally unpopular with others.
Volume-Number: Volume 22, Number 31
More information about the Comp.std.unix
mailing list