Todd C. Miller <[email protected]> wrote:
> Alternately, we could teach PTMGET to copy the close-on-exec flag
> from the ptm fd.
That feels better, and will be more atomic.
Two 1 line diffs in tty_pty.c
In the man page, it is easy also
device. The PTMGET command allocates a free pseudo terminal, changes its
ownership to the caller, revokes the access privileges for all previous
users, opens the file descriptors for the master and slave devices and
returns them to the caller in struct ptmget.
something like this
users, opens the file descriptors for the master and slave devices,
copy the O_CLOEXEC flag from the ptm device opening, and returns them
to the caller in struct ptmget.