Subject: serial ports
To: None <netbsd-bugs@sun-lamp.cs.berkeley.edu>
From: Brad Parker <brad@fcr.com>
List: netbsd-bugs
Date: 11/16/1993 15:32:03
I made the following change to "fix" my problems with using the serial
ports. It allows one to set the process group (for SIGIO) on a
terminal if the session has no controlling terminal (like a daemon)
and the terminal is not associated with a session. (I don't believe
this breaks the posix-ness of the code).
[I hope sending diffs like this is the "right thing"]
-brad
*** tty.c.~1~ Sun Nov 7 04:39:52 1993
--- tty.c Tue Nov 16 08:52:07 1993
***************
*** 544,550 ****
case TIOCSPGRP: {
register struct pgrp *pgrp = pgfind(*(int *)data);
! if (!isctty(p, tp))
return (ENOTTY);
else if (pgrp == NULL || pgrp->pg_session != p->p_session)
return (EPERM);
--- 544,550 ----
case TIOCSPGRP: {
register struct pgrp *pgrp = pgfind(*(int *)data);
! if ((p->p_session->s_ttyvp || tp->t_session) && !isctty(p, tp))
return (ENOTTY);
else if (pgrp == NULL || pgrp->pg_session != p->p_session)
return (EPERM);
------------------------------------------------------------------------------