Put in a check for RLIMIT_PROC before trying to use it.
This commit was SVN r14502.
Этот коммит содержится в:
родитель
321e08c605
Коммит
00347db419
10
configure.ac
10
configure.ac
@ -917,6 +917,16 @@ OMPI_CASE_SENSITIVE_FS_SETUP
|
|||||||
# AIX: FIONBIO in sys/ioctl.h
|
# AIX: FIONBIO in sys/ioctl.h
|
||||||
# glibc: memcpy
|
# glibc: memcpy
|
||||||
|
|
||||||
|
#
|
||||||
|
# Do we have RLIMIT_NPROC in <sys/resources.h>? (e.g., Solaris does not)
|
||||||
|
#
|
||||||
|
|
||||||
|
AC_CHECK_DECLS([RLIMIT_NPROC], [], [], [
|
||||||
|
AC_INCLUDES_DEFAULT
|
||||||
|
#if HAVE_SYS_RESOURCE_H
|
||||||
|
#include <sys/resource.h>
|
||||||
|
#endif])
|
||||||
|
|
||||||
# checkpoint results
|
# checkpoint results
|
||||||
AC_CACHE_SAVE
|
AC_CACHE_SAVE
|
||||||
|
|
||||||
|
@ -75,7 +75,8 @@ int opal_util_init_sys_limits(void)
|
|||||||
}
|
}
|
||||||
opal_sys_limits.num_files = rlim.rlim_cur;
|
opal_sys_limits.num_files = rlim.rlim_cur;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if HAVE_RLIMIT_NPROC
|
||||||
/* get/set the system limits on number of child procs we can have open */
|
/* get/set the system limits on number of child procs we can have open */
|
||||||
if (getrlimit (RLIMIT_NPROC, &rlim) < 0) {
|
if (getrlimit (RLIMIT_NPROC, &rlim) < 0) {
|
||||||
opal_output(0, "getrlimit (RLIMIT_NPROC) failed: %s\n", strerror(errno));
|
opal_output(0, "getrlimit (RLIMIT_NPROC) failed: %s\n", strerror(errno));
|
||||||
@ -88,6 +89,7 @@ int opal_util_init_sys_limits(void)
|
|||||||
}
|
}
|
||||||
opal_sys_limits.num_procs = rlim.rlim_cur;
|
opal_sys_limits.num_procs = rlim.rlim_cur;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* get/set the system limits on max file size we can create */
|
/* get/set the system limits on max file size we can create */
|
||||||
if (getrlimit (RLIMIT_FSIZE, &rlim) < 0) {
|
if (getrlimit (RLIMIT_FSIZE, &rlim) < 0) {
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user