[Lldb-commits] [PATCH] D128504: debugserver: spawn process in its own process group
Jim Ingham via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 24 09:13:40 PDT 2022
Why is it desirable to have the debugger not see signals sent to the process?
Jim
> On Jun 24, 2022, at 1:06 AM, Alessandro Arzilli via Phabricator via lldb-commits <lldb-commits at lists.llvm.org> wrote:
>
> aarzilli created this revision.
> aarzilli added reviewers: jasonmolenda, clayborg.
> aarzilli added a project: LLDB.
> Herald added a subscriber: JDevlieghere.
> Herald added a project: All.
> aarzilli requested review of this revision.
> Herald added a subscriber: lldb-commits.
>
> Change POSIX spawn launch flavor to spawn process in its own process group, like the fork/exec flavor does.
> This is useful because the target process can then be made controlling process for its tty and receive terminal signals (such as SIGINT generated in response to the user pressing ^C) without debugserver also receiving them.
>
>
> Repository:
> rG LLVM Github Monorepo
>
> https://reviews.llvm.org/D128504
>
> Files:
> lldb/tools/debugserver/source/MacOSX/MachProcess.mm
>
>
> Index: lldb/tools/debugserver/source/MacOSX/MachProcess.mm
> ===================================================================
> --- lldb/tools/debugserver/source/MacOSX/MachProcess.mm
> +++ lldb/tools/debugserver/source/MacOSX/MachProcess.mm
> @@ -3268,7 +3268,7 @@
> return INVALID_NUB_PROCESS;
>
> flags = POSIX_SPAWN_START_SUSPENDED | POSIX_SPAWN_SETSIGDEF |
> - POSIX_SPAWN_SETSIGMASK;
> + POSIX_SPAWN_SETSIGMASK | POSIX_SPAWN_SETPGROUP;
> if (disable_aslr)
> flags |= _POSIX_SPAWN_DISABLE_ASLR;
>
>
>
> <D128504.439658.patch>_______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
More information about the lldb-commits
mailing list