nspawn: check return of setsid()
Let's verify that everything works the way we expect it to work, hence check setsid() return code.
This commit is contained in:
parent
7b8c70ed20
commit
efe4266240
|
@ -66,7 +66,10 @@ int stub_pid1(sd_id128_t uuid) {
|
||||||
if (pid == 0) {
|
if (pid == 0) {
|
||||||
/* Return in the child */
|
/* Return in the child */
|
||||||
assert_se(sigprocmask(SIG_SETMASK, &oldmask, NULL) >= 0);
|
assert_se(sigprocmask(SIG_SETMASK, &oldmask, NULL) >= 0);
|
||||||
setsid();
|
|
||||||
|
if (setsid() < 0)
|
||||||
|
return log_error_errno(errno, "Failed to become session leader in payload process: %m");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue