Skip to content

Commit 76e8d08

Browse files
akofmanshazron
authored andcommitted
Fixes #219 - iOS 9.3 app hangs on splash screen
Fixes cases where process is not yet running. Signed-off-by: Shazron Abdullah <[email protected]>
1 parent 3ef9dfe commit 76e8d08

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

src/scripts/lldb.py

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,15 @@ def run_command(debugger, command, result, internal_dict):
4242

4343
def safequit_command(debugger, command, result, internal_dict):
4444
process = lldb.target.process
45-
listener = debugger.GetListener()
46-
listener.StartListeningForEvents(process.GetBroadcaster(), lldb.SBProcess.eBroadcastBitStateChanged | lldb.SBProcess.eBroadcastBitSTDOUT | lldb.SBProcess.eBroadcastBitSTDERR)
47-
event = lldb.SBEvent()
48-
while True:
49-
if listener.WaitForEvent(1, event) and lldb.SBProcess.EventIsProcessEvent(event):
50-
state = lldb.SBProcess.GetStateFromEvent(event)
51-
else:
52-
state = process.GetState()
53-
54-
if state == lldb.eStateRunning:
55-
process.Detach()
56-
os._exit(0)
57-
elif state > lldb.eStateRunning:
58-
os._exit(state)
45+
state = process.GetState()
46+
if state == lldb.eStateRunning:
47+
process.Detach()
48+
os._exit(0)
49+
elif state > lldb.eStateRunning:
50+
os._exit(state)
51+
else:
52+
print('\\nApplication has not been launched\\n')
53+
os._exit(1)
5954

6055
def autoexit_command(debugger, command, result, internal_dict):
6156
process = lldb.target.process

0 commit comments

Comments
 (0)