Details
Description
The code in verify_exec.c seems to be wrong:
if (a->transaction.background) { #ifdef __MINGW32__ outsourced = true; #else Log(LOG_LEVEL_VERBOSE, "Backgrounding job '%s'", cmdline); outsourced = fork(); #endif } else { outsourced = false; } if (outsourced || (!a->transaction.background)) // work done here: either by child or non-background parent ...
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:
/* exit() OK since this is a forked process and no functions are registered for cleanup */ exit(EXIT_SUCCESS);
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?