Add patch from upstream:
599b5c7524
After fork if the child process uses close_range to close open file
descriptors it has no way to exempt the parentPipeFD causing a failure
to signal successful startup to the parent process. This causes
failures on all systems that aren't Linux that implement close_range.
1. Loop through file descriptors between beginClose and
MAX(parentPipeFD,dbgGetDbglogFd()) making sure not to close those two
file descriptors.
2. Potentially use close_range to close all file descriptors above
MAX(parentPipeFD,dbgGetDbglogFd())
PR: 274509
Reported by: Helmut Ritter
Obtained from: https://github.com/rsyslog/rsyslog/pull/5254