From owner-freebsd-hackers Sat Apr 6 08:34:17 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id IAA06423 for hackers-outgoing; Sat, 6 Apr 1996 08:34:17 -0800 (PST) Received: from haldjas.folklore.ee (Haldjas.folklore.ee [193.40.6.121]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id IAA06377 for ; Sat, 6 Apr 1996 08:34:07 -0800 (PST) Received: (from narvi@localhost) by haldjas.folklore.ee (8.6.12/8.6.12) id TAA13824; Sat, 6 Apr 1996 19:32:00 +0300 Date: Sat, 6 Apr 1996 19:31:59 +0300 (EET DST) From: Narvi To: Thomas Roell cc: Joerg Wunsch , Thomas Roell , hackers@FreeBSD.org, jkh@time.cdrom.com, roell@xinside.com Subject: Re: The F_SETOWN problem.. In-Reply-To: <199604061123.NAA00406@blah.a.isar.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk On Sat, 6 Apr 1996, Thomas Roell wrote: > In your message of 6 April 1996 you write: > > > As Thomas Roell wrote: > > > > > > F_SETOWN on a tty only works for controlling terminals. This is because > > > > F_SETOWN is implemented as tcsetpgrp() and tcsetpgrp() is specified by > > > > POSIX. > > > > > 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. > > > > See my other example (you might have missed it, i've sent it to > > freebsd-hackers). Basically, after #include'ing the appropriate > > headers: > > > > fork() -> exit the parent > > setsid() > > ioctl(fd, TIOCSCTTY, NULL) Couldn't the forked child use the IPC to notify it's parent what is going on on the other tty? Or generate any number of child's having the specific controlling terminals reporting the parent (which has maybe detached itself from any) back about what goes on on each one? > > > > I doubt this is what you want :), don't you think polling with > > select() would be easier? > > This is neither what I want, nor is select() easier to use for me in > this scenario. Actually I'm using select() right now and want to get > rid of it. > > > > 2) Can my progress have two controlling ttys ? > > > > Of course not. > > That's what I thought. > > > > 3) Since this process has opened already a virutal terminal, he is > > > recieving signals for VT switching. Now if I would detach this one > > > from being the controlling tty and move the controlling tty to > > > /dev/cuaa1, would I still get those signals ? > > > > Of course not. But you would see the SIGHUP caused by unplugging the > > mouse. =:) > > *sigh* > -- > Denver Office THOMAS ROELL /\ Das Reh springt hoch, > +1(303)298-7478 X INSIDE INC / \/\ das Reh springt weit, > 1801 Broadway, Suite 1710 / \ \/\ was soll es tun, > Denver, CO 80202 roell@xinside.com / Oelch! \ \ es hat ja Zeit. > Sander Eat good food, preserve nature, be nice to all nice people :)