diff options
author | 2003-11-23 23:17:34 +0000 | |
---|---|---|
committer | 2003-11-23 23:17:34 +0000 | |
commit | dcfe3b1f9d7dd1105aa3617f58c587b7f1ab2766 (patch) | |
tree | fbce0af60d2f4e0f1fd72882b014fd4804e9d1ed /usr.bin/ssh/ssh-keyscan.c | |
parent | If gld${EMULATION_NAME}_search_dir() returns NULL, return early (diff) | |
download | wireguard-openbsd-dcfe3b1f9d7dd1105aa3617f58c587b7f1ab2766.tar.xz wireguard-openbsd-dcfe3b1f9d7dd1105aa3617f58c587b7f1ab2766.zip |
from portable - use sysconf to detect fd limit; ok markus@
Diffstat (limited to 'usr.bin/ssh/ssh-keyscan.c')
-rw-r--r-- | usr.bin/ssh/ssh-keyscan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh-keyscan.c b/usr.bin/ssh/ssh-keyscan.c index 4fc962063c4..348bc3a6d29 100644 --- a/usr.bin/ssh/ssh-keyscan.c +++ b/usr.bin/ssh/ssh-keyscan.c @@ -7,7 +7,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keyscan.c,v 1.45 2003/09/19 11:30:39 markus Exp $"); +RCSID("$OpenBSD: ssh-keyscan.c,v 1.46 2003/11/23 23:17:34 djm Exp $"); #include <sys/queue.h> #include <errno.h> @@ -210,7 +210,7 @@ fdlim_get(int hard) if (getrlimit(RLIMIT_NOFILE, &rlfd) < 0) return (-1); if ((hard ? rlfd.rlim_max : rlfd.rlim_cur) == RLIM_INFINITY) - return 10000; + return sysconf(_SC_OPEN_MAX); else return hard ? rlfd.rlim_max : rlfd.rlim_cur; } |