aports/main/m4/0001-test-execute-main.c-set-default-handler-for-SIGPIPE-.patch
psykose fe27b8e5bc main/m4: fix check with make 4.4
seems that make 4.4 does sig_ign for sigpipe now..
2022-12-10 23:29:43 +01:00

37 lines
1.4 KiB
Diff

Patch-Source: https://lists.gnu.org/archive/html/bug-m4/2022-11/msg00003.html
From ed64def45d68b2af53f1d3d783cc98e9dbe2ff74 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex@linutronix.de>
Date: Sat, 12 Nov 2022 15:18:41 +0100
Subject: [PATCH] test-execute-main.c: set default handler for SIGPIPE in tests
3 and 4
make 4.4 sets this to SIG_IGN and the tests fail
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
tests/test-execute-main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/test-execute-main.c b/tests/test-execute-main.c
index 372ff1d..b4c1ddf 100644
--- a/tests/test-execute-main.c
+++ b/tests/test-execute-main.c
@@ -132,6 +132,7 @@ main (int argc, char *argv[])
#if !(defined _WIN32 && !defined __CYGWIN__)
{
/* Check SIGPIPE handling with ignore_sigpipe = false. */
+ signal(SIGPIPE, SIG_DFL);
const char *prog_argv[3] = { prog_path, "3", NULL };
int termsig = 0x7DEADBEE;
int ret = execute (progname, prog_argv[0], prog_argv, NULL,
@@ -145,6 +146,7 @@ main (int argc, char *argv[])
#if !(defined _WIN32 && !defined __CYGWIN__)
{
/* Check SIGPIPE handling with ignore_sigpipe = true. */
+ signal(SIGPIPE, SIG_DFL);
const char *prog_argv[3] = { prog_path, "4", NULL };
int termsig = 0x7DEADBEE;
int ret = execute (progname, prog_argv[0], prog_argv, NULL,
--
2.30.2