From 74c21c48b296b475a17bc26844223bb9a709d254 Mon Sep 17 00:00:00 2001 From: Alex Bligh Date: Sun, 5 Jun 2011 16:15:49 +0100 Subject: [PATCH] nbd-tester-client: ignore SIGPIPE so we pick up and print the error --- nbd-tester-client.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nbd-tester-client.c b/nbd-tester-client.c index 6145997..fee2d87 100644 --- a/nbd-tester-client.c +++ b/nbd-tester-client.c @@ -1183,6 +1183,9 @@ int main(int argc, char**argv) { int testflags=0; testfunc test = throughput_test; + /* Ignore SIGPIPE as we want to pick up the error from write() */ + signal (SIGPIPE, SIG_IGN); + if(argc<3) { g_message("%d: Not enough arguments", (int)getpid()); g_message("%d: Usage: %s ", (int)getpid(), argv[0]); -- 1.7.10.4