From 8c7321b11512cc3cfd112ad2b4b65c5a81e12bba Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sat, 28 Sep 2019 12:08:12 +0200 Subject: tools: Ignore SIGPIPE wherever possible --- tools/idevicename.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/idevicename.c') diff --git a/tools/idevicename.c b/tools/idevicename.c index ef226f7..a66f5aa 100644 --- a/tools/idevicename.c +++ b/tools/idevicename.c @@ -28,6 +28,9 @@ #include #include #include +#ifndef WIN32 +#include +#endif #include #include @@ -57,6 +60,10 @@ int main(int argc, char** argv) { NULL, 0, NULL, 0} }; +#ifndef WIN32 + signal(SIGPIPE, SIG_IGN); +#endif + while ((c = getopt_long(argc, argv, "du:h", longopts, &optidx)) != -1) { switch (c) { case 'u': -- cgit v1.1-32-gdbae