Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 May 1995 22:37:30 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, terry@cs.weber.edu
Cc:        daveh@CSUA.Berkeley.EDU, freebsd-hackers@freefall.cdrom.com, rgrimes@gndrsh.aac.dev.com
Subject:   Re: slattach!!!!!!!
Message-ID:  <199505051237.WAA21254@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> >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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199505051237.WAA21254>