1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

common: Cope with AIX problem on number of open files.

* common/exechelp-posix.c: Limit returned value for too hight values.
--

GnuPG-bug-id: 1778
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2015-05-11 20:18:08 +02:00
parent 26e2eb98d3
commit 987532b038
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -36,6 +36,9 @@
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
#include <string.h>
#include <errno.h>
#include <assert.h>
@ -114,6 +117,13 @@ get_max_fds (void)
if (max_fds == -1)
max_fds = 256; /* Arbitrary limit. */
/* AIX returns INT32_MAX instead of a proper value. We assume that
this is always an error and use an arbitrary limit. */
#ifdef INT32_MAX
if (max_fds == INT32_MAX)
max_fds = 256;
#endif
return max_fds;
}