pty.js
pty.js copied to clipboard
Add O_CLOEXEC in all open() calls
Add O_CLOEXEC
in all open()
calls. This prevent file descriptor leakage (like /dev/ptmx
descriptor). Note, that setting O_CLOEXEC
on /dev/pts/...
is safe since dup2(xxx, yyy)
that will be called in child process will reset O_CLOEXEC
.