Subject: Re: allocating controlling terminal on tty open?
To: None <current-users@NetBSD.ORG>
From: Todd Vierling <>
List: current-users
Date: 11/06/1997 16:28:49
On Wed, 5 Nov 1997, Todd Vierling wrote:

:     A controlling terminal is never acquired by merely opening a terminal
:     device file.
: Hm, has it always been this way?  I can't recall.  It seems that SVR4
: assumes that you allocate a controlling terminal by doing setpgrp() (SVR4
: doesn't take arguments; the emulation makes it equivalent to setpgid(0,0))
: in the child process followed by an open of a tty.  setsid() isn't called,
: except by the parent process (which is already a process group leader, so it
: gets EPERM).

I answered my own question; the emulation wasn't correct.  Reading the
Solaris 2.5.1 documentation, the SVR4 setpgrp() is identical to setsid()
except that it never returns error (always returns the pgid).  BSD setpgid()
doesn't create a new session, which SVR4 setpgrp() does.

== Todd Vierling (Personal; Business
== So you know what, Mikey?  Go to bed.