mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 10:56:31 +00:00
job-control: set CLOEXEC on pty processes. #5986
Before this change, new processes started with libuv prevented SIGHUP from reaching pty processes (by keeping the ptmx file descriptor open).
This commit is contained in:

committed by
Justin M. Keyes

parent
ad1884be0d
commit
f6946c68ae
@@ -439,14 +439,7 @@ void ml_setname(buf_T *buf)
|
||||
EMSG(_("E301: Oops, lost the swap file!!!"));
|
||||
return;
|
||||
}
|
||||
#ifdef HAVE_FD_CLOEXEC
|
||||
{
|
||||
int fdflags = fcntl(mfp->mf_fd, F_GETFD);
|
||||
if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) {
|
||||
(void)fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
(void)os_set_cloexec(mfp->mf_fd);
|
||||
}
|
||||
if (!success)
|
||||
EMSG(_("E302: Could not rename swap file"));
|
||||
|
Reference in New Issue
Block a user