]> git.proxmox.com Git - librados2-perl.git/commit
use POSIX::_exit instead of exit in forked child
authorFiona Ebner <f.ebner@proxmox.com>
Tue, 8 Aug 2023 11:23:12 +0000 (13:23 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 11 Aug 2023 07:01:01 +0000 (09:01 +0200)
commit8d524b3e0f50c979ace036efc8941731297dc678
treea91827f8637a845a93edfdcc62852cbf489b5e82
parent8cab00fca3f26887c1e5095849256c8082861695
use POSIX::_exit instead of exit in forked child

This avoids calling the END blocks and destructor routines most of
which have nothing to do with the fork, so it cannot be assumed to be
safe to do from the fork.

Move the call to pve_rados_shutdown from the destructor routine,
which will not be called by the child anymore. Make sure the cleanup
is also done when the worker dies.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
PVE/RADOS.pm