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/idevicescreenshot.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools/idevicescreenshot.c') diff --git a/tools/idevicescreenshot.c b/tools/idevicescreenshot.c index f2bcd48..38d323c 100644 --- a/tools/idevicescreenshot.c +++ b/tools/idevicescreenshot.c @@ -28,6 +28,9 @@ #include #include #include +#ifndef WIN32 +#include +#endif #include #include @@ -47,6 +50,9 @@ int main(int argc, char **argv) const char *udid = NULL; char *filename = NULL; +#ifndef WIN32 + signal(SIGPIPE, SIG_IGN); +#endif /* parse cmdline args */ for (i = 1; i < argc; i++) { if (!strcmp(argv[i], "-d") || !strcmp(argv[i], "--debug")) { -- cgit v1.1-32-gdbae