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.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Regardless of this patch, it is always possible to send signals directly to the target process. This is only about signals generated by the terminal.
Suppose you are debugging a program that does something in response to ^C: you will have to use kill in a different terminal to send the signal to the target process, because pressing ^C will send a signal to both debugserver and the target process, causing debugserver to die in response. I think it should be possible to set up the target process so that it has full control of its terminal, as it would be if it had been run outside of a debugger.
Sorry for the delay in replying to this, I'm fine with integrating this change. I won't pretend to understand all the ins & outs of signal delivery to process groups, but the best way to find if there's an issue with this kind of change is to try it out. Do you have commit access to the repository?