diff options
| author | Přemysl Eric Janouch <p@janouch.name> | 2021-07-06 17:25:25 +0200 | 
|---|---|---|
| committer | Přemysl Eric Janouch <p@janouch.name> | 2021-07-06 17:25:54 +0200 | 
| commit | 8d7a055b082a84eb01ab150fb29a375cf0ef091c (patch) | |
| tree | 11c792161fe38d19a5c646d9484fbb01dfc33afb | |
| parent | 4be24e17c36633cf0b7e277edd07bcb9dc3eba5b (diff) | |
| download | ponymap-8d7a055b082a84eb01ab150fb29a375cf0ef091c.tar.gz ponymap-8d7a055b082a84eb01ab150fb29a375cf0ef091c.tar.xz ponymap-8d7a055b082a84eb01ab150fb29a375cf0ef091c.zip | |
Set an upper limit on concurrent FDs
I don't have the time nor will to look into it properly.
| -rw-r--r-- | ponymap.c | 4 | 
1 files changed, 4 insertions, 0 deletions
| @@ -2014,6 +2014,10 @@ main (int argc, char *argv[])  	else  	{  		limit.rlim_cur = limit.rlim_max; + +		// But too much may be seriously detrimental to function +		limit.rlim_cur = MIN (limit.rlim_cur, 1 << 16); +  		if (setrlimit (RLIMIT_NOFILE, &limit))  			print_warning ("%s: %s", "setrlimit failed", strerror (errno));  	} | 
