the name of the core file written to the devctl socket is invalid when rotation occurs:
the effective core file is the oldest one, but the name sent to the devctl is the last tested one
in the following situation, files are scanned from test-0.core to test-4.core, but the oldest is test-2.core
the core file will be written to test-2.core, but the devctl will receive test-4.core
-rw-r--r-- 1 root wheel 0 Feb 13 14:32 test-0.core -rw-r--r-- 1 root wheel 0 Feb 13 14:32 test-1.core -rw-r--r-- 1 root wheel 0 Feb 13 14:31 test-2.core -rw-r--r-- 1 root wheel 0 Feb 13 14:31 test-3.core -rw-r--r-- 1 root wheel 0 Feb 13 14:31 test-4.core
with the fix, test-2.core will be sent to the devctl socket
Sponsored by: Stormshield