[pve-devel] applied: [PATCH common] fix #4615: RESTEnvironment: correctly detect AnyEvent in SIGCHLD handler
t.lamprecht at proxmox.com
Mon Mar 27 10:37:42 CEST 2023
Am 27/03/2023 um 10:26 schrieb Dominik Csapak:
> we assumed that the 'priv' and 'pub' RESTEnvironment types always
We might push it a bit here ;-)
> contained an AnyEvent eventloop, but this is actually not the case
> in pvestatd and pvescheduler.
> When we wrongly determined that, it depended on the used model that AnyEvent
> used (and autodetected) if it worked or not. With AnyEvent::Impl::Perl it did
> not make problems (and seemingly worked by accident), but when using
> AnyEvent::Impl::EV (which is autodetected and used when libev-perl is installed)
> it interfered with our SIG_CHLD handlers and only ever called them once.
> (Not clear why this happens, maybe because AnyEvent is not setup correctly).
> This patch uses $AnyEvent::MODEL as a detection instead since this
> is `undef` until the first AnyEvent watcher is created, which should
> be only the case where we really use AnyEvent, such as pveproxy and
> Fixes: 6870afa ("RESTEnvironment: better SIGCHLD handling in AnyEvent event loop")
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> src/PVE/RESTEnvironment.pm | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
applied, with commit subject/message touch up, thanks!
More information about the pve-devel