]> git.proxmox.com Git - pve-common.git/commit - debian/control
RESTEnvironment: better SIGCHLD handling in AnyEvent event loop
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 20 Feb 2023 10:08:28 +0000 (11:08 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 7 Mar 2023 17:36:47 +0000 (18:36 +0100)
commit6870afa45594da42ee7742e219358c5c76d059d2
tree3807c539e12d0bc4f3148f8f8668c553c26481b9
parent1a758ec1dda3a257292170471a0473217f996df4
RESTEnvironment: better SIGCHLD handling in AnyEvent event loop

when we're in an API server that uses AnyEvent, we must postpone
the worker_reaper, since it calls 'active_workers' which might already
be called and then we're inside the lock twice (flocks are per process
for us, see PVE::Tools::lock_file)

This resulted in an error like this:
close (rename) atomic file '/var/log/pve/tasks/active' failed: No such file or directory

We use the fact that only 'pub' and 'priv' RESTEnvironment types are an
api server with anyevent. For other types we call it like before.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
debian/control
src/PVE/RESTEnvironment.pm