summaryrefslogtreecommitdiffstats
path: root/innbbsd/closeonexec.c
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-01-08 15:54:00 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-01-08 15:54:00 +0800
commit271bcfc4e7d98aafb59b6e67399244f635ee74e8 (patch)
tree6c8c84e636581109db1de66d4036441c36b607c8 /innbbsd/closeonexec.c
parent9b4d34a17c6061171456ae8e4b63dcd270f53091 (diff)
downloadpttbbs-271bcfc4e7d98aafb59b6e67399244f635ee74e8.tar
pttbbs-271bcfc4e7d98aafb59b6e67399244f635ee74e8.tar.gz
pttbbs-271bcfc4e7d98aafb59b6e67399244f635ee74e8.tar.bz2
pttbbs-271bcfc4e7d98aafb59b6e67399244f635ee74e8.tar.lz
pttbbs-271bcfc4e7d98aafb59b6e67399244f635ee74e8.tar.xz
pttbbs-271bcfc4e7d98aafb59b6e67399244f635ee74e8.tar.zst
pttbbs-271bcfc4e7d98aafb59b6e67399244f635ee74e8.zip
indent -i4
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1473 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'innbbsd/closeonexec.c')
-rw-r--r--innbbsd/closeonexec.c51
1 files changed, 27 insertions, 24 deletions
diff --git a/innbbsd/closeonexec.c b/innbbsd/closeonexec.c
index e005e51b..1fd1a24e 100644
--- a/innbbsd/closeonexec.c
+++ b/innbbsd/closeonexec.c
@@ -1,7 +1,8 @@
-/* $Revision: 1.1 $
-**
-*/
-/*#include "configdata.h"*/
+/*
+ * $Revision: 1.1 $ *
+ *
+ */
+/* #include "configdata.h" */
#include <stdio.h>
#include <sys/types.h>
#include <errno.h>
@@ -9,58 +10,60 @@
#include "clibrary.h"
#ifndef CLX_IOCTL
-# define CLX_IOCTL
+#define CLX_IOCTL
#endif
#ifndef CLX_FCNTL
-# define CLX_FCNTL
+#define CLX_FCNTL
#endif
-
+
+
#if defined(CLX_IOCTL) && !defined(IRIX)
#ifdef __linux
-# include <termios.h>
+#include <termios.h>
#else
-# include <sgtty.h>
+#include <sgtty.h>
#endif
/*
-** Mark a file close-on-exec so that it doesn't get shared with our
-** children. Ignore any error codes.
-*/
+ * * 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 fd;
+ int flag;
{
- int oerrno;
+ int oerrno;
oerrno = errno;
(void)ioctl(fd, flag ? FIOCLEX : FIONCLEX, (char *)NULL);
errno = oerrno;
}
-#endif /* defined(CLX_IOCTL) */
+#endif /* defined(CLX_IOCTL) */
+
+
-
#if defined(CLX_FCNTL)
#include <fcntl.h>
/*
-** Mark a file close-on-exec so that it doesn't get shared with our
-** children. Ignore any error codes.
-*/
+ * * 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 fd;
+ int flag;
{
- int oerrno;
+ int oerrno;
oerrno = errno;
(void)fcntl(fd, F_SETFD, flag ? 1 : 0);
errno = oerrno;
}
-#endif /* defined(CLX_FCNTL) */
+#endif /* defined(CLX_FCNTL) */