Skip to content
Snippets Groups Projects
Commit 19ced982 authored by Tim Wickberg's avatar Tim Wickberg
Browse files

Add in rlimits_maximize_nofiles() to workaround setrlimit() restrictions on macOS.

Rather than repeat the #ifdef block through five locations, use a common
function to handle this and print a consistent error message if there
is an issue.

From getrlimit(2):
	setrlimit() now returns with errno set to EINVAL in places that
	historically succeeded. It no longer accepts "rlim_cur =
	RLIM_INFINITY" for RLIM_NOFILE. Use "rlim_cur = min(OPEN_MAX,
	rlim_max)".

(This was causing spurious error messages to appear for sbatch/srun.)
parent f4793182
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment