> It might be also possible to run an expression that will route
> stdin/stdout/stderr to /dev/null before detaching if we know that we have a
> master/slave pty hooked up the the inferior's in/out/err. We could run an
> expression like:
(At least on linux) you would also need something like:
io
s,Eugene
> From: lab...@google.com
> Date: Thu, 31 Mar 2016 09:16:06 +0100
> Subject: Re: [lldb-dev] SBProcess::Detach kills target
> To: eugen...@hotmail.com
> CC: lldb-dev@lists.llvm.org
>
> We are not sending the SIGHUP, it is automatically getting sent by the
> OS whe
________
>> To: lab...@google.com
>> Date: Wed, 30 Mar 2016 14:49:33 -0700
>> CC: lldb-dev@lists.llvm.org
>> Subject: Re: [lldb-dev] SBProcess::Detach kills target
>> From: lldb-dev@lists.llvm.org
>>
>>
>> Right, my bad. The problem was th
closes its pty's on detach and that causes the signal?
> What is the behavior on MAC?
>
>
> To: lab...@google.com
> Date: Wed, 30 Mar 2016 14:49:33 -0700
> CC: lldb-dev@lists.llvm.org
> Subject: Re: [lldb-dev] SBProcess::Detach kills t
ot send it in launch scenario too.
Thanks,Eugene
> From: lab...@google.com
> Date: Wed, 30 Mar 2016 10:22:33 +0100
> Subject: Re: [lldb-dev] SBProcess::Detach kills target
> To: eugen...@hotmail.com
> CC: jing...@apple.com; lldb-dev@lists.llvm.org
>
> So I have made a small t
gt; From: lab...@google.com
> Date: Wed, 30 Mar 2016 10:22:33 +0100
> Subject: Re: [lldb-dev] SBProcess::Detach kills target
> To: eugen...@hotmail.com
> CC: jing...@apple.com; lldb-dev@lists.llvm.org
>
> So I have made a small test program (which does nothing but spin in a
>
So I have made a small test program (which does nothing but spin in a
loop), and indeed it is the SIGHUP that kills it after detach. If the
test program blocks the signal, then it continues running even after
detach:
$ cat a.c
#include
#include
int main() {
signal(SIGHUP, SIG_IGN);
for (
pts/17 00:00:00
bash49259 pts/17 00:00:00 pseugene@EUGENEBI-L1:~/tmp$
Eugene
> From: lab...@google.com
> Date: Tue, 29 Mar 2016 09:43:50 +0100
> Subject: Re: [lldb-dev] SBProcess::Detach kills target
> To: jing...@apple.com; eugen...@hotmail.com
> CC: lldb-dev@lists.llvm.org
&
There is no system restriction which prevents you from doing this.
(Without any investigation) my guess would be that your inferior is
dying of SIGHUP, which it receives when we close the master end of its
pty. Could you check whether the behavior persists if your app blocks
SIGHUP and/or you launc
I vaguely remember that not all Unixen support detaching from a process that is
a child of the debugger that is attached to it. If you run the process under
gdb & detach, does the process survive? This may not be an exact test, since
gdb may use procfs rather than ptrace, I don't know any more
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
11 matches
Mail list logo