summaryrefslogtreecommitdiffstats
path: root/tools/idevicescreenshot.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2019-09-28 12:08:12 +0200
committerGravatar Nikias Bassen2019-09-28 12:08:53 +0200
commit8c7321b11512cc3cfd112ad2b4b65c5a81e12bba (patch)
tree306caad40518dbb123051efef3ce06ff3f3b7001 /tools/idevicescreenshot.c
parent92d95d0b8f1870d7cc9eb809a993b04b0e733205 (diff)
downloadlibimobiledevice-8c7321b11512cc3cfd112ad2b4b65c5a81e12bba.tar.gz
libimobiledevice-8c7321b11512cc3cfd112ad2b4b65c5a81e12bba.tar.bz2
tools: Ignore SIGPIPE wherever possible
Diffstat (limited to 'tools/idevicescreenshot.c')
-rw-r--r--tools/idevicescreenshot.c6
1 files changed, 6 insertions, 0 deletions
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 @@
28#include <stdlib.h> 28#include <stdlib.h>
29#include <errno.h> 29#include <errno.h>
30#include <time.h> 30#include <time.h>
31#ifndef WIN32
32#include <signal.h>
33#endif
31 34
32#include <libimobiledevice/libimobiledevice.h> 35#include <libimobiledevice/libimobiledevice.h>
33#include <libimobiledevice/lockdown.h> 36#include <libimobiledevice/lockdown.h>
@@ -47,6 +50,9 @@ int main(int argc, char **argv)
47 const char *udid = NULL; 50 const char *udid = NULL;
48 char *filename = NULL; 51 char *filename = NULL;
49 52
53#ifndef WIN32
54 signal(SIGPIPE, SIG_IGN);
55#endif
50 /* parse cmdline args */ 56 /* parse cmdline args */
51 for (i = 1; i < argc; i++) { 57 for (i = 1; i < argc; i++) {
52 if (!strcmp(argv[i], "-d") || !strcmp(argv[i], "--debug")) { 58 if (!strcmp(argv[i], "-d") || !strcmp(argv[i], "--debug")) {