From 54600a9eafda6e1b244dbdac05aa68678bff3fb5 Mon Sep 17 00:00:00 2001 From: senthil Date: Mon, 13 Oct 2014 17:20:52 -0400 Subject: [PATCH] Fixed two issues: 1. When the device is locked, the python source prints and exists. The server sees this as an empty packet. We are using this to exit out of the connection 2. When we use just launch, we need to do safequit and detach. Otherwise we hang for ever --- ios-deploy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ios-deploy.c b/ios-deploy.c index 531a548d..5e99dee4 100644 --- a/ios-deploy.c +++ b/ios-deploy.c @@ -48,6 +48,7 @@ const char* lldb_prep_interactive_cmds = "\ const char* lldb_prep_noninteractive_justlaunch_cmds = "\ run\n\ safequit\n\ + detach\n\ "; const char* lldb_prep_noninteractive_cmds = "\ @@ -789,6 +790,8 @@ server_callback (CFSocketRef s, CFSocketCallBackType callbackType, CFDataRef add // FIXME: Close the socket //shutdown (CFSocketGetNative (lldb_socket), SHUT_RDWR); //close (CFSocketGetNative (lldb_socket)); + CFSocketInvalidate(lldb_socket); + CFSocketInvalidate(server_socket); exit(exitcode_error); return; }