sysutils/rsyslog8: patch for forking issue due to close_range() call
Add patch from upstream:
https://github.com/rsyslog/rsyslog/commit/599b5c7524b76cfc73245206fcce1e2b4d955f21
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.
- Loop through file descriptors between beginClose and MAX(parentPipeFD,dbgGetDbglogFd()) making sure not to close those two file descriptors.
- 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