From owner-freebsd-hackers Fri May 5 05:45:57 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id FAA25634 for hackers-outgoing; Fri, 5 May 1995 05:45:57 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id FAA25619 for ; Fri, 5 May 1995 05:45:04 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id WAA21254; Fri, 5 May 1995 22:37:30 +1000 Date: Fri, 5 May 1995 22:37:30 +1000 From: Bruce Evans Message-Id: <199505051237.WAA21254@godzilla.zeta.org.au> To: bde@zeta.org.au, terry@cs.weber.edu Subject: Re: slattach!!!!!!! Cc: daveh@CSUA.Berkeley.EDU, freebsd-hackers@freefall.cdrom.com, rgrimes@gndrsh.aac.dev.com Sender: hackers-owner@FreeBSD.org Precedence: bulk >> >How can you get a HUP signal from the dial out device???? What version >> >> In the usual way: by making the dial out device a controlling terminal. >> slattach does this. >This has some rather profound mgetty implications, notably with regard >to controlling tty and first opener for process group leader, since >mgetty will have the port open first. I don't think mgetty can work with slattach or anything that doesn't use lockfiles. The precise behaviour depends on which port slattach opens: dialout port: the open will fail because mgetty has the dialin port open dialin port: the open will succeed (unless mgetty has exclusive access). Slattach won't get the terminal as its controlling terminal if mgetty already has it as its controlling terminal (but why would mgetty have it?), and will log the error. There will be more serious problems when both slattach and mgetty try to handle the terminal. Controlling ttys are not gained on first open by process group leaders in FreeBSD. When they are gained is implementation defined in POSIX, and FreeBSD defines it as when the process does a TIOCSCTTY in certain circumstances. This is normally done in login_tty() after setsid(). Bruce