From owner-freebsd-hackers Sun Apr 7 05:21:26 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id FAA09342 for hackers-outgoing; Sun, 7 Apr 1996 05:21:26 -0700 (PDT) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id FAA09337 for ; Sun, 7 Apr 1996 05:21:23 -0700 (PDT) Received: from msmith@localhost by genesis.atrad.adelaide.edu.au (8.6.12/8.6.9) id WAA06437; Sun, 7 Apr 1996 22:17:19 +0930 From: Michael Smith Message-Id: <199604071247.WAA06437@genesis.atrad.adelaide.edu.au> Subject: Re: The F_SETOWN problem.. To: terry@lambert.org (Terry Lambert) Date: Sun, 7 Apr 1996 22:17:19 +0930 (CST) Cc: roell@blah.a.isar.de, hackers@FreeBSD.ORG, jkh@time.cdrom.com, roell@xinside.com In-Reply-To: <199604070021.RAA28693@phaeton.artisoft.com> from "Terry Lambert" at Apr 6, 96 05:21:08 pm MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Terry Lambert stands accused of saying: > > > Ok, then I had 2 or 3 maybe very stupid sounding questions (and believe me, > > I tried to work around them for quite a while now): > > > > 1) How do I get my process to be the controlling pgrp of this tty ? I > > tried all things that worked under SVR4, but I'm lost on this one. > > Just a couple of sample code lines would help me here incredible. > > The question is wrong. > > The correct question is "how do I make this tty the controlling > tty for my process?". No, this is _not_ the correct question. The question is "how can I arrange to receive a signal (eg. SIGIO) when there is data to be read on a descriptor, without making it the controlling TTY." The answer is "you can't, without using a coprocess." This is a shame, however bde has provided some reasons as to why this currently isn't possible. Think about the problem at hand. > I assume you want this for SIGHUP processing? I used to work (for > more than 5 years) as THE software engineer (not including the > company president) for the #1 UNIX communications software (TERM). Er, almost certainly not. Try "low-cost asynchronous input". Remember what TR does? Think about how handy it would be to do your mouse data handling inside a signal handler; your main loop would be presented with events out of a FIFO as faits accompli, you could probably even stuff the location registers in the signal handler. >From my (naive) viewpoint, it would sure beat the hell out of using select(), which has alreaby been stated is the _current_ way of doing it. > Really, the entire idea of controlling ttys and signal delivery and > session and process and credential association is rather broken. Rant... 8) > Terry Lambert -- ]] Mike Smith, Software Engineer msmith@atrad.adelaide.edu.au [[ ]] Genesis Software genesis@atrad.adelaide.edu.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control (ph/fax) +61-8-267-3039 [[ ]] Collector of old Unix hardware. "Where are your PEZ?" The Tick [[