Problem reported by Thomas Fitzsimmons (Bug#30762).
* src/process.c (create_process) [HAVE_PTYS]:
Call setsid even if !PTY_FLAG.
{
/* Make the pty be the controlling terminal of the process. */
#ifdef HAVE_PTYS
- /* First, disconnect its current controlling terminal. */
- if (pty_flag)
- setsid ();
+ /* First, disconnect its current controlling terminal.
+ Do this even if !PTY_FLAG; see Bug#30762. */
+ setsid ();
/* Make the pty's terminal the controlling terminal. */
if (pty_flag && forkin >= 0)
{