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:
parent
26e2eb98d3
commit
987532b038
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user