From c04f48b4bf19f51172a801bc389f9d079d426a39 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sat, 11 Sep 2010 09:26:09 -0400 Subject: [PATCH] Quiet gcc warnings on glibc systems that use warn_unused_result for write(2). --- src/exec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/exec.c b/src/exec.c index 11b078df0..a000e5ac0 100644 --- a/src/exec.c +++ b/src/exec.c @@ -468,7 +468,8 @@ handler(int s) * The pipe is non-blocking, if we overflow the kernel's pipe * buffer we drop the signal. This is not a problem in practice. */ - (void)write(signal_pipe[1], &signo, sizeof(signo)); + if (write(signal_pipe[1], &signo, sizeof(signo)) == -1) + /* shut up glibc */; } /* -- 2.40.0