Date: Sun, 7 Apr 1996 22:17:19 +0930 (CST) From: Michael Smith <msmith@atrad.adelaide.edu.au> To: terry@lambert.org (Terry Lambert) Cc: roell@blah.a.isar.de, hackers@FreeBSD.ORG, jkh@time.cdrom.com, roell@xinside.com Subject: Re: The F_SETOWN problem.. Message-ID: <199604071247.WAA06437@genesis.atrad.adelaide.edu.au> In-Reply-To: <199604070021.RAA28693@phaeton.artisoft.com> from "Terry Lambert" at Apr 6, 96 05:21:08 pm
next in thread | previous in thread | raw e-mail | index | archive | help
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 [[
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604071247.WAA06437>