summaryrefslogtreecommitdiff
path: root/openbsd-compat/bsd-misc.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2004-08-15 18:40:59 +1000
committerDamien Miller <djm@mindrot.org>2004-08-15 18:40:59 +1000
commit36f496502072d82dbb202b41a199eb6032557710 (patch)
tree439092c6479cb2fea8c09318b37a61370d860638 /openbsd-compat/bsd-misc.c
parent25f60a7ee780c2cd4a01e05698149d274821012f (diff)
- (djm) [acconfig.h configure.ac openbsd-compat/Makefile.in
openbsd-compat/bsd-closefrom.c openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h openbsd-compat/openbsd-compat.h] Use smarter closefrom() replacement from sudo; ok dtucker@
Diffstat (limited to 'openbsd-compat/bsd-misc.c')
-rw-r--r--openbsd-compat/bsd-misc.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c
index 3a30b6e4..1b276b4f 100644
--- a/openbsd-compat/bsd-misc.c
+++ b/openbsd-compat/bsd-misc.c
@@ -1,3 +1,4 @@
+
/*
* Copyright (c) 1999-2004 Damien Miller <djm@mindrot.org>
*
@@ -17,7 +18,7 @@
#include "includes.h"
#include "xmalloc.h"
-RCSID("$Id: bsd-misc.c,v 1.24 2004/08/13 08:37:21 dtucker Exp $");
+RCSID("$Id: bsd-misc.c,v 1.25 2004/08/15 08:41:00 djm Exp $");
#ifndef HAVE___PROGNAME
char *__progname;
@@ -196,22 +197,6 @@ tcsendbreak(int fd, int duration)
}
#endif /* HAVE_TCSENDBREAK */
-#ifndef HAVE_CLOSEFROM
-int
-closefrom(int fd)
-{
- int i, result = 0, err = 0;
-
- for (i = fd; i < 128; i++)
- if (close(i) != 0) {
- err = errno;
- result = -1;
- }
- errno = err;
- return result;
-}
-#endif /* HAVE_CLOSEFROM */
-
mysig_t
mysignal(int sig, mysig_t act)
{