diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2004-12-18 22:35:42 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2004-12-18 22:35:42 +0000 |
commit | b277f4142edf5132e56ad2e197b0cd4ec79fa9b6 (patch) | |
tree | b6e849575bcc6a4510f877a15632133562f71ff8 /bin/ksh/tty.c | |
parent | db410d16f492f3893149595dc39abcb580283f6e (diff) |
Replace fd_clexec() with calls to fcntl(fd, F_SETFD, FD_CLOEXEC)
Diffstat (limited to 'bin/ksh/tty.c')
-rw-r--r-- | bin/ksh/tty.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ksh/tty.c b/bin/ksh/tty.c index c71f464da23..e197eaffadb 100644 --- a/bin/ksh/tty.c +++ b/bin/ksh/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.4 2004/12/18 22:12:23 millert Exp $ */ +/* $OpenBSD: tty.c,v 1.5 2004/12/18 22:35:41 millert Exp $ */ #include "sh.h" #include <sys/stat.h> @@ -46,7 +46,7 @@ tty_init(init_ttystate) if ((tty_fd = fcntl(tfd, F_DUPFD, FDBASE)) < 0) { warningf(FALSE, "j_ttyinit: dup of tty fd failed: %s", strerror(errno)); - } else if (fd_clexec(tty_fd) < 0) { + } else if (fcntl(tty_fd, F_SETFD, FD_CLOEXEC) < 0) { warningf(FALSE, "j_ttyinit: can't set close-on-exec flag: %s", strerror(errno)); close(tty_fd); |