mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 08:12:28 +00:00
Further improve usability of cosmocc
- Support -s flag in cosmocc - Support posix_spawn() setsid() feature - Disable monorepo debug path prefix stripping
This commit is contained in:
parent
f7ae50462a
commit
ee6566a152
9 changed files with 40 additions and 15 deletions
|
@ -84,6 +84,12 @@ int posix_spawn(int *pid, const char *path,
|
|||
if (!(child = vfork())) {
|
||||
if (attrp && *attrp) {
|
||||
posix_spawnattr_getflags(attrp, &flags);
|
||||
if (flags & POSIX_SPAWN_SETSID) {
|
||||
if (setsid()) {
|
||||
STRACE("posix_spawn fail #%d", 1);
|
||||
_Exit(127);
|
||||
}
|
||||
}
|
||||
if (flags & POSIX_SPAWN_SETPGROUP) {
|
||||
if (setpgid(0, (*attrp)->pgroup)) {
|
||||
STRACE("posix_spawn fail #%d", 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue