diff options
| author | 2019-09-28 12:08:12 +0200 | |
|---|---|---|
| committer | 2019-09-28 12:08:53 +0200 | |
| commit | 8c7321b11512cc3cfd112ad2b4b65c5a81e12bba (patch) | |
| tree | 306caad40518dbb123051efef3ce06ff3f3b7001 /tools/ideviceinfo.c | |
| parent | 92d95d0b8f1870d7cc9eb809a993b04b0e733205 (diff) | |
| download | libimobiledevice-8c7321b11512cc3cfd112ad2b4b65c5a81e12bba.tar.gz libimobiledevice-8c7321b11512cc3cfd112ad2b4b65c5a81e12bba.tar.bz2 | |
tools: Ignore SIGPIPE wherever possible
Diffstat (limited to 'tools/ideviceinfo.c')
| -rw-r--r-- | tools/ideviceinfo.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/ideviceinfo.c b/tools/ideviceinfo.c index 59fade8..a1124cf 100644 --- a/tools/ideviceinfo.c +++ b/tools/ideviceinfo.c | |||
| @@ -27,6 +27,9 @@ | |||
| 27 | #include <string.h> | 27 | #include <string.h> |
| 28 | #include <errno.h> | 28 | #include <errno.h> |
| 29 | #include <stdlib.h> | 29 | #include <stdlib.h> |
| 30 | #ifndef WIN32 | ||
| 31 | #include <signal.h> | ||
| 32 | #endif | ||
| 30 | 33 | ||
| 31 | #include <libimobiledevice/libimobiledevice.h> | 34 | #include <libimobiledevice/libimobiledevice.h> |
| 32 | #include <libimobiledevice/lockdown.h> | 35 | #include <libimobiledevice/lockdown.h> |
| @@ -121,6 +124,9 @@ int main(int argc, char *argv[]) | |||
| 121 | uint32_t xml_length; | 124 | uint32_t xml_length; |
| 122 | plist_t node = NULL; | 125 | plist_t node = NULL; |
| 123 | 126 | ||
| 127 | #ifndef WIN32 | ||
| 128 | signal(SIGPIPE, SIG_IGN); | ||
| 129 | #endif | ||
| 124 | /* parse cmdline args */ | 130 | /* parse cmdline args */ |
| 125 | for (i = 1; i < argc; i++) { | 131 | for (i = 1; i < argc; i++) { |
| 126 | if (!strcmp(argv[i], "-d") || !strcmp(argv[i], "--debug")) { | 132 | if (!strcmp(argv[i], "-d") || !strcmp(argv[i], "--debug")) { |
