Subject: Re: TIOCGPGRP
To: matthew green <mrg@eterna.com.au>
From: Jason Downs <downsj@teeny.org>
List: tech-kern
Date: 05/09/1996 20:01:08
In message <199605100217.MAA17569@eterna.com.au>,
	matthew green writes:
>
>   So, stupid question time: is there any good reason for not even allowing ro
>ot
>   to call TIOCGPGRP on any tty?  It's rather useless if you can only get the
>   process group of your own controlling tty.
>
>i don't have an answer, but, this seems somewhat related to 
>the change from BSD getpgrp() to POSIX getpgrp() 4.4 gave
>us ..  i've proposed that we have a getpgid() call that
>is identical to the old getpgrp() (and also happens to be
>compatible with svr4 :-).
>
>if this is ever added, TIOCGPGRP could perhaps be changed also.

Well, for the client I needed this for, I just changed the 1 line in tty.c
to allow root to call TIOCGPGRP for any tty.  It seems _very_ silly to 
restrict the ioctl/tcgetpgrp() to one's own controlling tty.

-- 
Jason Downs		   (503) 256-8535 -/- (503) 952-3749
downsj@teeny.org  --> teeny.org: Free Software for a Free Internet <--
http://www.teeny.org/
	      Powered by ... pentium/romp/ka630/68030/68020/68010