]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
lg2 cat_oid: call Perl %SIG handlers on EINTR
authorEric Wong <e@80x24.org>
Thu, 15 Jan 2026 02:18:36 +0000 (02:18 +0000)
committerEric Wong <e@80x24.org>
Sat, 17 Jan 2026 18:29:52 +0000 (18:29 +0000)
For all of our C code running within a Perl interpreter,
we need to call PERL_ASYNC_CHECK() after seeing EINTR to
ensure Perl dispatches %SIG handlers after a process
receives a signal.

lib/PublicInbox/lg2.h

index b897759511b1638b3a24b4480ef18d1f3858de33..af24a349e7084e395d9e20486db54bb26c461b8d 100644 (file)
@@ -127,6 +127,7 @@ int cat_oid(SV *self, int fd, SV *oidsv)
                        }
                                /* fall-through */
                        case EINTR:
+                               PERL_ASYNC_CHECK();
                                err = 0;
                        }
                } else { /* w == 0 */