Failure to raise FD limit on macOS (10.15.6)
I'm not sure from what version of macOS dbus begins to fail, but at least on 10.15.6 the following error occurs:
dbus-daemon[90437]: [session uid=501 pid=90437] org.freedesktop.DBus.Error.Failed: Failed to set fd limit to 9223372036854775807: Invalid argument
This is because of the following compatibility issue as listed on man setrlimit
:
COMPATIBILITY
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)".
Attached is a very simple patch to resolve this, as indicated by the man-page suggestion.