* Re: [PATCH] t/lei-sigpipe.t: ensure SIGPIPE is not ignored instead of not blocked
2022-03-14 22:14 7% ` Eric Wong
@ 2022-03-15 2:56 7% ` Julien Moutinho
0 siblings, 0 replies; 3+ results
From: Julien Moutinho @ 2022-03-15 2:56 UTC (permalink / raw)
To: Eric Wong; +Cc: meta, Dominique Martinet
Le lun. 14 mars 2022 22h14 +0000, Eric Wong a écrit :
> I (and any other project maintainer) would appreciate more
> complete explanations in the future as to why a patch is needed.
> Thanks again.
Oh sorry, being immersed into the testing I tought
that it was obvious. I should have clarified
that the unblocking fix was not working.
Thanks for the merge!
^ permalink raw reply [relevance 7%]
* Re: [PATCH] t/lei-sigpipe.t: ensure SIGPIPE is not ignored instead of not blocked
2022-03-11 10:42 6% ` [PATCH] t/lei-sigpipe.t: ensure SIGPIPE is not ignored instead of not blocked Julien Moutinho
@ 2022-03-14 22:14 7% ` Eric Wong
2022-03-15 2:56 7% ` Julien Moutinho
0 siblings, 1 reply; 3+ results
From: Eric Wong @ 2022-03-14 22:14 UTC (permalink / raw)
To: Julien Moutinho; +Cc: meta, Dominique Martinet
Julien Moutinho <julm+public-inbox@sourcephile.fr> wrote:
> Ignoring a signal is different than blocking a signal.
Thanks, pushed as commit f1e4e14793d155ea7d6ed7a6858b668e97c7e5d8
I wasn't sure why this patch was necessary at first. Thus I
took take a closer look at systemd behavior to confirm, and
updated the message:
Ignoring a signal is different than blocking a signal, and the
"IgnoreSIGPIPE" option of systemd ignores.
[ew: note systemd behavior]
Acked-by: Eric Wong <e@80x24.org>
I (and any other project maintainer) would appreciate more
complete explanations in the future as to why a patch is needed.
Thanks again.
^ permalink raw reply [relevance 7%]
* [PATCH] t/lei-sigpipe.t: ensure SIGPIPE is not ignored instead of not blocked
@ 2022-03-11 10:42 6% ` Julien Moutinho
2022-03-14 22:14 7% ` Eric Wong
0 siblings, 1 reply; 3+ results
From: Julien Moutinho @ 2022-03-11 10:42 UTC (permalink / raw)
To: meta; +Cc: Dominique Martinet, Eric Wong, Julien Moutinho
Ignoring a signal is different than blocking a signal.
---
t/lei-sigpipe.t | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/t/lei-sigpipe.t b/t/lei-sigpipe.t
index 7fab9aeb..55c208e2 100644
--- a/t/lei-sigpipe.t
+++ b/t/lei-sigpipe.t
@@ -4,20 +4,16 @@
use strict;
use v5.10.1;
use PublicInbox::TestCommon;
-use POSIX qw(WTERMSIG WIFSIGNALED SIGPIPE SIG_UNBLOCK SIG_SETMASK sigprocmask);
+use POSIX qw(WTERMSIG WIFSIGNALED SIGPIPE);
use PublicInbox::OnDestroy;
-# undo systemd (and similar) blocking SIGPIPE, since lei expects to be run
+# 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 $set = POSIX::SigSet->new;
-my $old = POSIX::SigSet->new;
-$set->emptyset or xbail "sigemptyset $!";
-$old->emptyset or xbail "sigemptyset $!";
-$set->addset(SIGPIPE);
-sigprocmask(SIG_UNBLOCK, $set, $old) or xbail "SIG_UNBLOCK: $!";
+my $oldSIGPIPE = $SIG{PIPE};
+$SIG{PIPE} = 'DEFAULT';
my $cleanup = PublicInbox::OnDestroy->new($$, sub {
- sigprocmask(SIG_SETMASK, $old);
+ $SIG{PIPE} = $oldSIGPIPE;
});
test_lei(sub {
--
2.35.1
^ permalink raw reply related [relevance 6%]
Results 1-3 of 3 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-02-27 11:17 [PATCH] t/lei-sigpipe: ensure SIGPIPE is unblocked for this test Eric Wong
2022-03-11 10:42 6% ` [PATCH] t/lei-sigpipe.t: ensure SIGPIPE is not ignored instead of not blocked Julien Moutinho
2022-03-14 22:14 7% ` Eric Wong
2022-03-15 2:56 7% ` Julien Moutinho
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).