From owner-freebsd-current Thu Mar 30 2: 0:23 2000 Delivered-To: freebsd-current@freebsd.org Received: from gatekeeper.tsc.tdk.com (gatekeeper.tsc.tdk.com [207.113.159.21]) by hub.freebsd.org (Postfix) with ESMTP id 6D89137BB8D for ; Thu, 30 Mar 2000 02:00:14 -0800 (PST) (envelope-from gdonl@tsc.tdk.com) Received: from imap.gv.tsc.tdk.com (imap.gv.tsc.tdk.com [192.168.241.198]) by gatekeeper.tsc.tdk.com (8.8.8/8.8.8) with ESMTP id CAA02071; Thu, 30 Mar 2000 02:00:01 -0800 (PST) (envelope-from gdonl@tsc.tdk.com) Received: from salsa.gv.tsc.tdk.com (salsa.gv.tsc.tdk.com [192.168.241.194]) by imap.gv.tsc.tdk.com (8.9.3/8.9.3) with ESMTP id CAA06996; Thu, 30 Mar 2000 02:00:00 -0800 (PST) (envelope-from Don.Lewis@tsc.tdk.com) Received: (from gdonl@localhost) by salsa.gv.tsc.tdk.com (8.8.5/8.8.5) id BAA01712; Thu, 30 Mar 2000 01:59:59 -0800 (PST) From: Don Lewis Message-Id: <200003300959.BAA01712@salsa.gv.tsc.tdk.com> Date: Thu, 30 Mar 2000 01:59:59 -0800 In-Reply-To: <200003201900.LAA05709@bubba.whistle.com> References: <200003201900.LAA05709@bubba.whistle.com> X-Mailer: Mail User's Shell (7.2.6 beta(5) 10/07/98) To: Archie Cobbs , Don.Lewis@tsc.tdk.com (Don Lewis) Subject: Re: kern/8324 Cc: bright@wintelcom.net (Alfred Perlstein), freebsd-current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mar 20, 11:00am, Archie Cobbs wrote: } Subject: Re: kern/8324 } Don Lewis writes: } > This patch (vs the 3.4-STABLE version of tty.c) causes SIGIO to be } > sent when a regular or pseudo tty becomes writeable. } > } > } > --- tty.c.orig Sun Aug 29 09:26:09 1999 } > +++ tty.c Sat Mar 18 03:09:32 2000 } > @@ -2133,6 +2133,8 @@ } > } > if (tp->t_wsel.si_pid != 0 && tp->t_outq.c_cc <= tp->t_olowat) } > selwakeup(&tp->t_wsel); } > + if (ISSET(tp->t_state, TS_ASYNC) && tp->t_sigio != NULL) } > + pgsigio(tp->t_sigio, SIGIO, (tp->t_session != NULL)); } > if (ISSET(tp->t_state, TS_BUSY | TS_SO_OCOMPLETE) == } > TS_SO_OCOMPLETE && tp->t_outq.c_cc == 0) { } > CLR(tp->t_state, TS_SO_OCOMPLETE); } > } > } > BTW, I had to add: } > fcntl(1, F_SETOWN, getpid()); } > to the test program since there is no longer a default target to send } > the signal to. The old scheme had the defect of sending SIGIO to the } > process group that owned the terminal, which implied that the terminal } > had to be the controlling terminal for the process group. This limited } > a process to only receiving SIGIO from one terminal device even if it } > had more than one open and it wanted to receive SIGIO from all of them. } > Also, SIGIO was sent to the entire process group, but it may be desireable } > to limit this to one process. I wonder if it might make sense to go } > back to the old default for tty devices so that processes only receive } > SIGIO when they are in the foreground ... } } Don- } } After applying your patch to kern/tty.c and adding the F_SETOWN, } the problem indeed seems to go away.. } } Is this patch ready to be committed, or do we need more reviewers? Sorry for the delay, I was out of town most of last week and sick most of this week. It's probably safe to commit to -current if someone can give it a quick test there. Unfortunately I don't have a box running -current to test it on. Now, on to some more of my 6280 unread email messages :-( To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message