freebsd-dev/lib/libutil
Ed Schouten 8d333b3c85 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.

In theory we could remove a lot of code from openpty() on FreeBSD
-CURRENT, because grantpt(), unlockpt() and revoke() are not needed in
our implementation. We'd better keep them there. This makes the code
still work with older FreeBSD releases and even makes it work on other
non-BSD operating systems.

I've compiled openpty() on Linux. You only need to remove the revoke()
call, because revoke() on Linux always returns -1. Apart from that, it
seems to work like it should.

Reviewed by:	jhb
2008-10-03 09:42:50 +00:00
..
_secure_path.3 Sort sections. 2005-01-20 09:17:07 +00:00
_secure_path.c Grammar in a comment. 2004-12-18 12:31:12 +00:00
auth.3 Sort sections. 2005-01-20 09:17:07 +00:00
auth.c
auth.conf.5 Reflect the reality; only crypt(3) uses /etc/auth.conf 2005-01-21 12:07:46 +00:00
expand_number.3 Constify the first argument to expand_number() so that it can 2007-11-18 02:20:02 +00:00
expand_number.c Add #include <inttypes.h> for the strtoimax(). 2008-07-07 12:20:34 +00:00
flopen.3 Adjust history. 2007-09-28 15:31:44 +00:00
flopen.c Back out previous commit until I figure out why my regression test fails. 2007-08-03 09:20:28 +00:00
fparseln.3 Scheduled mdoc(7) sweep. 2005-01-11 20:50:51 +00:00
fparseln.c
gr_util.c Add four utility functions related to struct grp processing modeled in-part 2008-04-23 00:49:13 +00:00
hexdump.3 Merge hexdump(9) to userland as hexdump(3) in libutil. I'm tired of doing 2008-07-01 22:30:57 +00:00
hexdump.c Merge hexdump(9) to userland as hexdump(3) in libutil. I'm tired of doing 2008-07-01 22:30:57 +00:00
humanize_number.3 Adjust history. 2007-09-28 15:31:44 +00:00
humanize_number.c Merge changes from NetBSD on humanize_number.c, 1.8 -> 1.13 2008-03-08 21:55:59 +00:00
kld.3 Adjust history. 2007-09-28 15:31:44 +00:00
kld.c - Add include for libutil.h and string.h for prototype. 2006-05-25 04:01:04 +00:00
libutil.h Merge hexdump(9) to userland as hexdump(3) in libutil. I'm tired of doing 2008-07-01 22:30:57 +00:00
login_auth.3
login_auth.c
login_cap.3 Document the quirks of ~/.login_conf and LOGIN_MECLASS. 2007-06-14 09:33:37 +00:00
login_cap.c Update some comments, mostly regarding LOGIN_MECLASS and ~/.login_conf. 2007-06-14 06:42:49 +00:00
login_cap.h Add support for a new login capability, cpumask which allows login 2008-07-25 19:58:14 +00:00
login_class.3 Add support for a new login capability, cpumask which allows login 2008-07-25 19:58:14 +00:00
login_class.c Integrate the new MPSAFE TTY layer to the FreeBSD operating system. 2008-08-20 08:31:58 +00:00
login_crypt.c
login_ok.3 Fix a typo: "the give login class" to "the given login class." 2006-11-05 19:00:08 +00:00
login_ok.c Fix typo in comment. 2006-01-16 00:28:11 +00:00
login_times.3
login_times.c Restore use of strncpy(), as there is later unconditional termination 2006-01-16 11:54:07 +00:00
login_tty.3
login_tty.c Remove California Regent's clause 3, per letter 2007-01-09 01:02:06 +00:00
login.3
login.c Remove California Regent's clause 3, per letter 2007-01-09 01:02:06 +00:00
login.conf.5 Integrate the new MPSAFE TTY layer to the FreeBSD operating system. 2008-08-20 08:31:58 +00:00
logout.3
logout.c Remove California Regent's clause 3, per letter 2007-01-09 01:02:06 +00:00
logwtmp.3
logwtmp.c Remove California Regent's clause 3, per letter 2007-01-09 01:02:06 +00:00
Makefile Merge hexdump(9) to userland as hexdump(3) in libutil. I'm tired of doing 2008-07-01 22:30:57 +00:00
pidfile.3 Minor mdoc cleanup: Every sentence should start on its own line. 2007-10-13 11:09:45 +00:00
pidfile.c When pidfile is already locked and has zero length, do not return 2007-10-12 10:38:05 +00:00
property.3 Sort sections. 2005-01-20 09:17:07 +00:00
property.c Restore the previous state after a FILL operation in properties_read() 2005-11-28 16:30:16 +00:00
pty.3 Update the manpage for openpty(3) to account for the recent fixes. 2008-01-14 23:49:56 +00:00
pty.c Small cleanups to openpty(). 2008-10-03 09:42:50 +00:00
pw_util.c Remove California Regent's clause 3, per letter 2007-01-09 01:02:06 +00:00
realhostname_sa.3 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
realhostname.3 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
realhostname.c NI_WITHSCOPEID cleanup. Neither RFC 2553 nor RFC 3493 defines 2005-05-13 16:31:11 +00:00
stub.c
trimdomain.3
trimdomain.c When removing the local domain, only do so when the result will be a 2005-10-05 04:42:20 +00:00
uucplock.3 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
uucplock.c Remove California Regent's clause 3, per letter 2007-01-09 01:02:06 +00:00