Overhaul process spawning

This commit is contained in:
Justine Tunney 2023-09-10 08:12:43 -07:00
parent 99dc1281f5
commit 26e254fb4d
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
96 changed files with 1848 additions and 1541 deletions

View file

@ -23,14 +23,16 @@
/**
* Creates session and sets the process group id.
*
* @return new session id, or -1 w/ errno
* @raise EPERM if already the leader
*/
int setsid(void) {
int rc;
if (!IsWindows() && !IsMetal()) {
rc = sys_setsid();
} else {
rc = 0;
rc = getpid();
}
STRACE("setsid() → %d% m", rc);
return rc;