[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33050: 27.0.50; [macOS] Problem with process input with process-conn

From: Filipp Gunbin
Subject: bug#33050: 27.0.50; [macOS] Problem with process input with process-connection-type nil
Date: Thu, 25 Oct 2018 18:51:17 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (darwin)

On 24/10/2018 18:07 -0400, Thomas Fitzsimmons wrote:

> Hi Filipp,
> However, ttname's value on my system does correspond to the
> process-connection-type setting.

Yes, so in your case child process doesn't have controlling terminal,
while in my case it does.

process.c Line 2069:

  #ifdef DARWIN_OS
    /* Darwin doesn't let us run setsid after a vfork, so use fork when
       necessary.  Also, reset SIGCHLD handling after a vfork, as
       apparently macOS can mistakenly deliver SIGCHLD to the child.  */
    if (pty_flag)
      pid = fork ();
        pid = vfork ();
        if (pid == 0)
          signal (SIGCHLD, SIG_DFL);
    pid = vfork ();

With process-connection-type nil, we call vfork() and then setsid()
apparently fails (at least to reset child's controlling terminal).

I tried to change the above to just use fork(), and got the correct

If only I knew how to fix this correctly, without reverting to fork()
:-) Does anyone have ideas?  I'll try to look into this further myself,
and will write back.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]