🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.unix
Article #650

Re: disabling TIOCGPGRP on pty master sides

#650
From: Sean Eric Fagan
Date: Fri, 14 Dec 1990 19:52
26 lines
1676 bytes
Submitted-by: sef@kithrup.COM (Sean Eric Fagan)

In article <15827@cs.utexas.edu> nix%valis.asd.sgi.com@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@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
Technical Details
Message-ID: <15891@cs.utexas.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!jsq
References: <15827@cs.utexas.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!jsq
From: sef@kithrup.COM (Sean Eric Fagan)
Newsgroups: comp.std.unix
Subject: Re: disabling TIOCGPGRP on pty master sides
Message-ID: <15891@cs.utexas.edu>
Date: 14 Dec 90 19:52:18 GMT
References: <15827@cs.utexas.edu>
Sender: jsq@cs.utexas.edu
Organization: Kithrup Enterprises, Ltd.
Lines: 26
Approved: jsq@cs.utexas.edu (Moderator, John S. Quarterman)
X-Submissions: std-unix@uunet.uu.net