summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-03-08 12:14:22 +1100
committerDamien Miller <djm@mindrot.org>2013-03-08 12:14:22 +1100
commite4f43478228256ddbbce3b7f0c312ff5c707b667 (patch)
tree5703916e54430cc878cdbae9aab558c1520c8f1c
parent2b6ea47106537cff31c863d05062ac97efe3f132 (diff)
- (djm) [configure.ac] Add a timeout to the select/rlimit test to give it a
chance to complete on broken systems; ok dtucker@
-rw-r--r--ChangeLog2
-rw-r--r--configure.ac9
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 728de6ad..3b5b5482 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,8 @@
was removed in configure.ac rev 1.481 as it was redundant.
- (tim) [Makefile.in] Add another missing $(EXEEXT) I should have seen 3 days
ago.
+ - (djm) [configure.ac] Add a timeout to the select/rlimit test to give it a
+ chance to complete on broken systems; ok dtucker@
20130306
- (dtucker) [regress/forward-control.sh] Wait longer for the forwarding
diff --git a/configure.ac b/configure.ac
index ccf3373b..6005d7c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.512 2013/03/06 06:48:48 dtucker Exp $
+# $Id: configure.ac,v 1.513 2013/03/08 01:14:23 djm Exp $
#
# Copyright (c) 1999-2004 Damien Miller
#
@@ -15,7 +15,7 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org])
-AC_REVISION($Revision: 1.512 $)
+AC_REVISION($Revision: 1.513 $)
AC_CONFIG_SRCDIR([ssh.c])
AC_LANG([C])
@@ -2673,6 +2673,7 @@ AC_RUN_IFELSE(
struct rlimit rl_zero;
int fd, r;
fd_set fds;
+ struct timeval tv;
fd = open("/dev/null", O_RDONLY);
FD_ZERO(&fds);
@@ -2680,7 +2681,9 @@ AC_RUN_IFELSE(
rl_zero.rlim_cur = rl_zero.rlim_max = 0;
setrlimit(RLIMIT_FSIZE, &rl_zero);
setrlimit(RLIMIT_NOFILE, &rl_zero);
- r = select(fd+1, &fds, NULL, NULL, NULL);
+ tv.tv_sec = 1;
+ tv.tv_usec = 0;
+ r = select(fd+1, &fds, NULL, NULL, &tv);
exit (r == -1 ? 1 : 0);
]])],
[AC_MSG_RESULT([yes])