+use PublicInbox::OnDestroy;
+
+# undo systemd (and similar) ignoring SIGPIPE, since lei expects to be run
+# from an interactive terminal:
+# https://public-inbox.org/meta/20220227080422.gyqowrxomzu6gyin@sourcephile.fr/
+my $oldSIGPIPE = $SIG{PIPE};
+$SIG{PIPE} = 'DEFAULT';
+my $cleanup = PublicInbox::OnDestroy->new($$, sub {
+ $SIG{PIPE} = $oldSIGPIPE;
+});
+