mirror of git://git.gnupg.org/gnupg.git
common: Cope with AIX problem on number of open files.
* common/exechelp.c: Limit returned value for too hight values.
--
GnuPG-bug-id: 1778
(backport from master commit 987532b038
)
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
baae8d50d7
commit
776bee6d37
|
@ -21,6 +21,9 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
|
@ -134,6 +137,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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue