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

From: Robert Pluim <[email-masked]>
Date: Tue, 28 Jan 2020 08:59:35 +0100

>>>>> On Mon, 27 Jan 2020 20:19:07 +0200, Eli Zaretskii <[email-masked]> said:

    >> Date: Mon, 27 Jan 2020 22:26:10 +0900
    >> From: [email-masked]
    >> Cc: "Eli Zaretskii" <[email-masked]>,
    >> [email-masked],
    >> "Tomasz Kowal" <[email-masked]>,
    >> [email-masked]
    >> 
    >> This is a variant of Bug#24325: Crash - fd larger than FD_SETSIZE.
    >> Some functions in the Core Foundation framework on macOS
    >> call setrlimit for RLIMIT_NOFILE in order to increase the limit of
    >> the maximum number of open files for the process:
    >> 
    >> https://opensource.apple.com/source/CF/CF-1153.18/CFSocket.c.auto.html
    >> 
    >> So the fix for Bug#24325 doesn't work in this case.

    Eli> Thanks.

    Eli> So I guess one possible solution would be to see that fd is beyond
    Eli> FD_SETSIZE, and if so, call getrlimit to see if the limit was bumped
    Eli> up, and if so, reallocate the arrays used by process.c?  Would that
    Eli> make sense?

This will break {p}select, no? Thatʼs defined to only work up to
FD_SETSIZE.

Robert