Felipe Contreras wrote:

> Processes are not being started correctly with TIOCSCTTY, which does
> succeed after setsid().
> 
> None of that stuff is necessary, including the silencing of SIGHUP.
> 
> It's not even executed when shellpipe is off.

I suspect removing setsid() will cause trouble if a terminal with a
shell is started and that shell exits.  There is a reason this code was
added.  It was done long ago, I don't recall how to reproduce the
problem.

Just removing the TIOCSCTTY seems to already fix the problem.  So how
about just deleting these lines:

> 
> -#  ifdef TIOCSCTTY
> -                 // Try to become controlling tty (probably doesn't work,
> -                 // unless run by root)
> -                 ioctl(pty_slave_fd, TIOCSCTTY, (char *)NULL);
> -#  endif

I wonder what the simplest way is to test the fix.


-- 
ROBIN:  The what?
ARTHUR: The Holy Hand Grenade of Antioch.  'Tis one of the sacred relics
        Brother Maynard always carries with him.
ALL:    Yes. Of course.
ARTHUR: (shouting) Bring up the Holy Hand Grenade!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202105311723.14VHNbfK2088437%40masaka.moolenaar.net.

Raspunde prin e-mail lui