summaryrefslogtreecommitdiffstats
path: root/pty.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-02-09 02:11:24 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-02-09 02:11:24 +0000
commit31ca54aa86a90052f8fe73fda66c7f39fd5079bc (patch)
tree91bf4097b9145323fd2aee645a2a42348e33b22e /pty.c
parente9cf357a99dcd2db14635974289e04f5f0808123 (diff)
- itojun@cvs.openbsd.org 2001/02/08 19:30:52
sync with netbsd tree changes. - more strict prototypes, include necessary headers - use paths.h/pathnames.h decls - size_t typecase to int -> u_long
Diffstat (limited to 'pty.c')
-rw-r--r--pty.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pty.c b/pty.c
index 83b219b9..e71bceb8 100644
--- a/pty.c
+++ b/pty.c
@@ -12,7 +12,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: pty.c,v 1.20 2001/01/21 19:05:53 markus Exp $");
+RCSID("$OpenBSD: pty.c,v 1.22 2001/02/08 19:30:52 itojun Exp $");
#ifdef HAVE_UTIL_H
# include <util.h>
@@ -217,7 +217,7 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname)
/* First disconnect from the old controlling tty. */
#ifdef TIOCNOTTY
- fd = open("/dev/tty", O_RDWR | O_NOCTTY);
+ fd = open(_PATH_TTY, O_RDWR | O_NOCTTY);
if (fd >= 0) {
(void) ioctl(fd, TIOCNOTTY, NULL);
close(fd);
@@ -230,7 +230,7 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname)
* Verify that we are successfully disconnected from the controlling
* tty.
*/
- fd = open("/dev/tty", O_RDWR | O_NOCTTY);
+ fd = open(_PATH_TTY, O_RDWR | O_NOCTTY);
if (fd >= 0) {
error("Failed to disconnect from controlling tty.");
close(fd);
@@ -262,7 +262,7 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname)
#endif /* USE_VHANGUP */
}
/* Verify that we now have a controlling tty. */
- fd = open("/dev/tty", O_WRONLY);
+ fd = open(_PATH_TTY, O_WRONLY);
if (fd < 0)
error("open /dev/tty failed - could not set controlling tty: %.100s",
strerror(errno));