summaryrefslogtreecommitdiffstats
path: root/tools/idevicename.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/idevicename.c
parent92d95d0b8f1870d7cc9eb809a993b04b0e733205 (diff)
downloadlibimobiledevice-8c7321b11512cc3cfd112ad2b4b65c5a81e12bba.tar.gz
libimobiledevice-8c7321b11512cc3cfd112ad2b4b65c5a81e12bba.tar.bz2
tools: Ignore SIGPIPE wherever possible
Diffstat (limited to 'tools/idevicename.c')
-rw-r--r--tools/idevicename.c7
1 files changed, 7 insertions, 0 deletions
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 @@
28#include <unistd.h> 28#include <unistd.h>
29#include <stdlib.h> 29#include <stdlib.h>
30#include <getopt.h> 30#include <getopt.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>
@@ -57,6 +60,10 @@ int main(int argc, char** argv)
57 { NULL, 0, NULL, 0} 60 { NULL, 0, NULL, 0}
58 }; 61 };
59 62
63#ifndef WIN32
64 signal(SIGPIPE, SIG_IGN);
65#endif
66
60 while ((c = getopt_long(argc, argv, "du:h", longopts, &optidx)) != -1) { 67 while ((c = getopt_long(argc, argv, "du:h", longopts, &optidx)) != -1) {
61 switch (c) { 68 switch (c) {
62 case 'u': 69 case 'u':