Fix fdwalk on OS X

svn path=/trunk/; revision=6253
This commit is contained in:
Matthias Clasen 2008-01-06 23:12:24 +00:00
parent dbc8cd84c5
commit 6554c8509f
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-01-06 Matthias Clasen <mclasen@redhat.com>
* glib/gspawn.c (fdwalk): Don't set open_max to
RLIM_INFINITY. (#495589, Tommi Komulainen)
2008-01-06 Matthias Clasen <mclasen@redhat.com>
* README.in, INSTALL.in: Document new dependencies.

View File

@ -941,7 +941,7 @@ fdwalk (int (*cb)(void *data, int fd), void *data)
#ifdef HAVE_SYS_RESOURCE_H
if (getrlimit(RLIMIT_NOFILE, &rl) == 0)
if (getrlimit(RLIMIT_NOFILE, &rl) == 0 && rl.rlim_max != RLIM_INFINITY)
open_max = rl.rlim_max;
else
#endif