Subject: Re: 27.0.50; create_process on Darwin should not invoke setsid() after vfork() [PATCH]

From: Paul Eggert <[email-masked]>
Date: Wed, 7 Nov 2018 07:40:36 -0800

Filipp Gunbin wrote:
> Are you sure we can remove that 3rd place?  It dates back to initial
> revision from 1992.  And I can't tell why it's there and what it does.

It's there to dissociate the controlling tty. And it's not removed, it's just 
moved into the previous call to dissociate_controlling_tty (when setsid fails).

It is a little disconcerting to change code this old. But we needn't worry about 
how it would run on 4.3BSD, only on current platforms. On most current platforms 
setsid suffices because POSIX says it should; on Darwin (and perhaps a few other 
BSD-derived systems) Emacs can fall back on TIOCNOTTY when setsid fails; and the 
proposed code does this more systematically than the current master does.