Allow timeout for download and run
This commit is contained in:
15
ios-deploy.c
15
ios-deploy.c
@@ -1602,7 +1602,22 @@ void timeout_callback(CFRunLoopTimerRef timer, void *info) {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (!debug)
|
||||||
printf("[....] No more devices found.\n");
|
printf("[....] No more devices found.\n");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int mypid = getpid();
|
||||||
|
if ((parent != 0) && (parent == mypid) && (child != 0))
|
||||||
|
{
|
||||||
|
//we shouldn't be here because it is the parent
|
||||||
|
//just in case.
|
||||||
|
if (verbose)
|
||||||
|
{
|
||||||
|
printf("Timeout. Killing child (%d) tree\n", child);
|
||||||
|
}
|
||||||
|
kill_ptree(child, SIGHUP);
|
||||||
|
}
|
||||||
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user