diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-05-25 11:56:59 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-05-25 11:56:59 +0800 |
commit | 908974d959af2da886efead345d0b2bfbcc33b01 (patch) | |
tree | 24021622d22cb6c5c65b16e0a5e640ba960aecb3 /innbbsd | |
parent | afaef9bc9b8d29e8d2526882750408d8e41913c5 (diff) | |
download | pttbbs-908974d959af2da886efead345d0b2bfbcc33b01.tar pttbbs-908974d959af2da886efead345d0b2bfbcc33b01.tar.gz pttbbs-908974d959af2da886efead345d0b2bfbcc33b01.tar.bz2 pttbbs-908974d959af2da886efead345d0b2bfbcc33b01.tar.lz pttbbs-908974d959af2da886efead345d0b2bfbcc33b01.tar.xz pttbbs-908974d959af2da886efead345d0b2bfbcc33b01.tar.zst pttbbs-908974d959af2da886efead345d0b2bfbcc33b01.zip |
- remove dead code (closeOnExec)
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4478 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'innbbsd')
-rw-r--r-- | innbbsd/closeonexec.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/innbbsd/closeonexec.c b/innbbsd/closeonexec.c index 1fd1a24e..b41fdd69 100644 --- a/innbbsd/closeonexec.c +++ b/innbbsd/closeonexec.c @@ -9,9 +9,6 @@ #include <sys/ioctl.h> #include "clibrary.h" -#ifndef CLX_IOCTL -#define CLX_IOCTL -#endif #ifndef CLX_FCNTL #define CLX_FCNTL #endif @@ -19,33 +16,6 @@ -#if defined(CLX_IOCTL) && !defined(IRIX) -#ifdef __linux -#include <termios.h> -#else -#include <sgtty.h> -#endif - - -/* - * * Mark a file close-on-exec so that it doesn't get shared with our * - * children. Ignore any error codes. - */ -void -closeOnExec(fd, flag) - int fd; - int flag; -{ - int oerrno; - - oerrno = errno; - (void)ioctl(fd, flag ? FIOCLEX : FIONCLEX, (char *)NULL); - errno = oerrno; -} -#endif /* defined(CLX_IOCTL) */ - - - #if defined(CLX_FCNTL) #include <fcntl.h> @@ -63,7 +33,7 @@ CloseOnExec(fd, flag) int oerrno; oerrno = errno; - (void)fcntl(fd, F_SETFD, flag ? 1 : 0); + (void)fcntl(fd, F_SETFD, flag ? FD_CLOEXEC : 0); errno = oerrno; } #endif /* defined(CLX_FCNTL) */ |