mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-04 10:18:31 +00:00
Overhaul process spawning
This commit is contained in:
parent
99dc1281f5
commit
26e254fb4d
96 changed files with 1848 additions and 1541 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue