summaryrefslogtreecommitdiff
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 83b219b90..e71bceb80 100644
--- a/pty.c
+++ b/pty.c
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$OpenBSD: pty.c,v 1.20 2001/01/21 19:05:53 markus Exp $"); 15RCSID("$OpenBSD: pty.c,v 1.22 2001/02/08 19:30:52 itojun Exp $");
16 16
17#ifdef HAVE_UTIL_H 17#ifdef HAVE_UTIL_H
18# include <util.h> 18# include <util.h>
@@ -217,7 +217,7 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname)
217 217
218 /* First disconnect from the old controlling tty. */ 218 /* First disconnect from the old controlling tty. */
219#ifdef TIOCNOTTY 219#ifdef TIOCNOTTY
220 fd = open("/dev/tty", O_RDWR | O_NOCTTY); 220 fd = open(_PATH_TTY, O_RDWR | O_NOCTTY);
221 if (fd >= 0) { 221 if (fd >= 0) {
222 (void) ioctl(fd, TIOCNOTTY, NULL); 222 (void) ioctl(fd, TIOCNOTTY, NULL);
223 close(fd); 223 close(fd);
@@ -230,7 +230,7 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname)
230 * Verify that we are successfully disconnected from the controlling 230 * Verify that we are successfully disconnected from the controlling
231 * tty. 231 * tty.
232 */ 232 */
233 fd = open("/dev/tty", O_RDWR | O_NOCTTY); 233 fd = open(_PATH_TTY, O_RDWR | O_NOCTTY);
234 if (fd >= 0) { 234 if (fd >= 0) {
235 error("Failed to disconnect from controlling tty."); 235 error("Failed to disconnect from controlling tty.");
236 close(fd); 236 close(fd);
@@ -262,7 +262,7 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname)
262#endif /* USE_VHANGUP */ 262#endif /* USE_VHANGUP */
263 } 263 }
264 /* Verify that we now have a controlling tty. */ 264 /* Verify that we now have a controlling tty. */
265 fd = open("/dev/tty", O_WRONLY); 265 fd = open(_PATH_TTY, O_WRONLY);
266 if (fd < 0) 266 if (fd < 0)
267 error("open /dev/tty failed - could not set controlling tty: %.100s", 267 error("open /dev/tty failed - could not set controlling tty: %.100s",
268 strerror(errno)); 268 strerror(errno));