mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-16 10:20:02 +02:00
e2c304d473
The main improvement is a double-fork to prevent zombie processes if the parent process exits after the (child) async process. This is a real possibility since the parent process sticks around to monitor the results of the async process. In the first fork, ignore SIGCHLD in the very unlikely case that the async process exits before the first fork. This is probably only possible if the async process exits immediately, perhaps due to a chdir() failure. Set SIGCHLD back to default in the async process so waitpid() will work as expected. Also update the comment on chdir() to more accurately reflect what is happening. Finally, add a test in certain debug builds to ensure the first fork exits very quickly. This only works when valgrind is not in use because valgrind makes forking so slow that it is hard to tell if the async process performed work or not (in the case that the second fork goes missing and the async process is a direct child). |
||
---|---|---|
.. | ||
BuildTest.pm | ||
CodeCountTest.pm | ||
ContainerTest.pm | ||
CoverageTest.pm | ||
DefineTest.pm | ||
ExecuteTest.pm | ||
FileTest.pm | ||
HostGroupTest.pm | ||
HostTest.pm | ||
JobTest.pm | ||
ListTest.pm | ||
LogTest.pm | ||
RunTest.pm | ||
Storage.pm | ||
StoragePosix.pm | ||
StoragePosixRead.pm | ||
StoragePosixWrite.pm | ||
VmTest.pm |