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");
|
||||
}
|
||||
|
||||
if (setpgid(0, 0) < 0)
|
||||
suicide("setpgid failed: %s", strerror(errno));
|
||||
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));
|
||||
}
|
||||
|
||||
spawn_ifch();
|
||||
spawn_sockd();
|
||||
|
Loading…
Reference in New Issue
Block a user