Calling SBProcess::Detach() on a process that is currently running should always detach and this seems like a bug. This might be this way because if you launch a process in LLDB and then quit:
% lldb /bin/ls (lldb) b malloc (lldb) run (lldb) quit This should kill the process if it was launched and detach if we attached. But only when we quit without telling it to do something. If we did: % lldb /bin/ls (lldb) b malloc (lldb) run (lldb) detach Then this should always detach if the user explicitly requests it no matter how it was launched. > On Mar 25, 2016, at 3:35 PM, Eugene Birukov via lldb-dev > <lldb-dev@lists.llvm.org> wrote: > > Hi, > > Is this expected behavior or am I doing something wrong? > > I am running my C++ program that uses LLDB API on Linux Ubuntu 15.10. > > If I attach to already running process then SBProcess::Detach() behaves as > expected - my debugger quits and the target keeps running. But if the target > was launched by my debugger, then detach just kills it. Is there any way to > leave the target running? > > Thanks, > Eugene > _______________________________________________ > lldb-dev mailing list > lldb-dev@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev _______________________________________________ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev