setpgid() can return EPERM if we are already a process group leader.
This commit is contained in:
parent
e5834da6d3
commit
730e5ef310
@ -485,8 +485,11 @@ int main(int argc, char *argv[])
|
|||||||
default: suicide("failed to set the interface to up state");
|
default: suicide("failed to set the interface to up state");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setpgid(0, 0) < 0)
|
if (setpgid(0, 0) < 0) {
|
||||||
|
// EPERM is returned if we are already a process group leader.
|
||||||
|
if (errno != EPERM)
|
||||||
suicide("setpgid failed: %s", strerror(errno));
|
suicide("setpgid failed: %s", strerror(errno));
|
||||||
|
}
|
||||||
|
|
||||||
spawn_ifch();
|
spawn_ifch();
|
||||||
spawn_sockd();
|
spawn_sockd();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user