The code in verify_exec.c seems to be wrong:
fork() returns non-zero (true) value to the parent process. So the work seems to be done in the parent process!
Moreover, further down in that code there is this:
where man:atexit(3) explicitly says:
When a child process is created via fork(2), it inherits copies of its parent's registrations.
So again, WTH?