https://llvm.org/bugs/show_bug.cgi?id=27238
Bug ID: 27238
Summary: Python API: Unable to detach a process in running
state.
Product: lldb
Version: unspecified
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: release blocker
Priority: P
Component: All Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
The following code used to work before xcode 7.3 lldb-350.0.21.3. Now it seems
that the process can't be detached anymore. There is no error, it just hangs
when trying to detach and never execute the os._exit(0). Any thought ?
safequit_command(debugger, command, result, internal_dict):
process = lldb.target.process
listener = debugger.GetListener()
listener.StartListeningForEvents(process.GetBroadcaster(),
lldb.SBProcess.eBroadcastBitStateChanged | lldb.SBProcess.eBroadcastBitSTDOUT |
lldb.SBProcess.eBroadcastBitSTDERR)
event = lldb.SBEvent()
while True:
if listener.WaitForEvent(1, event) and
lldb.SBProcess.EventIsProcessEvent(event):
state = lldb.SBProcess.GetStateFromEvent(event)
else:
state = process.GetState()
if state == lldb.eStateRunning:
process.Detach()
os._exit(0)
elif state > lldb.eStateRunning:
os._exit(state)
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev