🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.unix
Article #649

disabling TIOCGPGRP on pty master sides

#649
From: Insufficient Dada
Date: Fri, 14 Dec 1990 03:12
26 lines
1593 bytes
Submitted-by: nix%valis.asd.sgi.com@SGI.COM (Insufficient Dada)

POSIX apparently specifies that the TIOCGPGRP ioctl is disabled if
called on a terminal other than the controlling terminal of the
calling process, apparently for security reasons. This behavior breaks
the subshell handling of GNU Emacs, and apparently interferes with the
operation of the XView terminal emulator as well.  GNU Emacs uses ptys
to communicate with shell subprocesses, and attempts to send signals
to the foreground process in a subshell by finding the process group
associated with the (master side of the) pty.

With TIOCGPGRP disabled, there seems not to be any way to send signals
to a process running in an inferior shell other than figuring out the
appropriate control character to send through termio to cause the
signal to be sent.

Does POSIX have an alternate mechanism for this?  If not, could
someone elaborate on the security problems with allowing a process to
find the pgrp of an arbitrary tty?  How about allowing a process to
find the pgrp of the slave side of a pty when it owns the master side?

	Nick

Nick Thompson		nix@sgi.com		...!uunet!sgi!nix

Volume-Number: Volume 22, Number 30
Technical Details
Message-ID: <15827@cs.utexas.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!jsq

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!jsq
From: nix%valis.asd.sgi.com@SGI.COM (Insufficient Dada)
Newsgroups: comp.std.unix
Subject: disabling TIOCGPGRP on pty master sides
Message-ID: <15827@cs.utexas.edu>
Date: 14 Dec 90 03:12:18 GMT
Sender: jsq@cs.utexas.edu
Lines: 26
Approved: jsq@cs.utexas.edu (Moderator, John S. Quarterman)
X-Submissions: std-unix@uunet.uu.net