]> code.delx.au - gnu-emacs/commit
Fix "not a tty" bug on Solaris 10
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 11 Jun 2015 23:41:36 +0000 (16:41 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 11 Jun 2015 23:42:10 +0000 (16:42 -0700)
commit32e53667a91ed479743175d5698a89b163c8be94
tree6f608ebc4a2e184208714fbe93bb03e6580a254e
parent8d0efee90c0ad3b44c14b77403599cba1b168044
Fix "not a tty" bug on Solaris 10

* configure.ac (PTY_OPEN): Define to plain 'open'
on SVR4-derived hosts, so that the O_CLOEXEC flag isn't set.
* src/process.c (allocate_pty): Set the O_CLOEXEC flag after
calling PTY_TTY_NAME_SPRINTF, for the benefit of SVR4-derived
hosts that call grantpt which does its work via a setuid subcommand
(Bug#19191, Bug#19927, Bug#20555, Bug#20686).
Also, set O_CLOEXEC even if PTY_OPEN is not defined, since it
seems relevant in that case too.
configure.ac
src/process.c