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:
Justine Tunney 2023-07-10 05:55:00 -07:00
parent f7ae50462a
commit ee6566a152
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
9 changed files with 40 additions and 15 deletions

View file

@ -18,6 +18,7 @@
*/
#include "libc/calls/calls.h"
#include "libc/calls/syscall-sysv.internal.h"
#include "libc/dce.h"
#include "libc/intrin/strace.internal.h"
/**
@ -26,7 +27,11 @@
*/
int setsid(void) {
int rc;
rc = sys_setsid();
if (!IsWindows() && !IsMetal()) {
rc = sys_setsid();
} else {
rc = 0;
}
STRACE("setsid() → %d% m", rc);
return rc;
}