Change debugserver's posix_spawn() to spawn an inferior process in
its own process group, so signals from the terminal like control-c
are passed to the inferior process instead of debugserer. In lldb's
own native-host launching, there is a LaunchInfo option
LaunchInSeparateProcessGroup, and this mirrors the most common
setting of that on Darwin systems.
Patch by Alessandro Arzilli <alessandro.arzilli@gmail.com>.
Differential Revision: https://reviews.llvm.org/D128504
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;