Date: Sun, 26 Oct 2008 21:56:06 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/lib/libc/stdlib grantpt.3 grantpt.c src/lib/libutil pty.c Message-ID: <200810262156.m9QLuFh4061537@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
ed 2008-10-26 21:56:06 UTC FreeBSD src repository Modified files: (Branch: RELENG_6) lib/libc/stdlib grantpt.3 grantpt.c lib/libutil pty.c Log: SVN rev 184301 on 2008-10-26 21:56:06Z by ed MFC r183565: Small cleanups to openpty(). - Pass O_NOCTTY to posix_openpt(2). This makes the implementation work consistently on implementations that make the PTY the controlling TTY by default. - Call unlockpt() before opening the slave device. POSIX mentions that de slave device should only be opened after grantpt() and unlockpt() have been called. - Replace some redundant code by a label. As a safety net, add a call to revoke() to unlockpt(). All applications out there use openpty(), explicitly call revoke() or implement their own PTY allocation routines. Adding the call to unlockpt() won't hurt, but will prevent foot-shooting. Reviewed by: jhb, kib Approved by: re Revision Changes Path 1.3.10.1 +0 -5 src/lib/libc/stdlib/grantpt.3 1.4.2.4 +10 -4 src/lib/libc/stdlib/grantpt.c 1.15.10.3 +15 -23 src/lib/libutil/pty.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810262156.m9QLuFh4061537>