Subject: | signal handler can be called recursively |
Date: | Mon, 15 Jan 2018 10:41:25 +0100 |
To: | bug-IO-Async-Loop-Epoll [...] rt.cpan.org |
From: | Oliver Kindernay <kindernay [...] dispecer.sk> |
In 0.17, the flag for signal pending is reset only after the call to the
the handler. If the handler runs the loop (for example with calling
->get on some future), thus recursively calling loop_once, the handler
can be also called recursively.
Attached patch to reset the pending flag before the handler is being called.
Currently I go around it by calling $loop->later(sub { .. handler body
.. }) in the signal handler subroutine.
Message body is not shown because sender requested not to inline it.