Subject: Re: bug#39164: 27.0.60; Intermittent crash on MacOS 10.14 in setup_process_coding_systems

From: Eli Zaretskii <[email-masked]>
Date: Thu, 30 Jan 2020 16:49:48 +0200

> Date: Thu, 30 Jan 2020 18:42:41 +0900
> From: YAMAMOTO Mitsuharu <[email-masked]>
> Cc: [email-masked],
> 	[email-masked],
> 	[email-masked],
> 	[email-masked],
> 	[email-masked]
> 
> > My point is that having this code in the same place for all platforms is better for long-range maintenance.
> 
> If we make dummy calls before setrlimit in init_process_emacs, then an
> artificially increased limit is recorded to the variable nofile_limit,
> and that will be used in restore_nofile_limit later.

That's true, but restore_nofile_limit is called after the fork in the
context of the child process, so can that call cause any harm?

If it does do harm, maybe we should simply avoid that call on macOS?