1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-25 23:21:33 +03:00

nspawn: report back to systemd only very late whether we are OK

That way, systemd can actually figure out if everything is OK with
nspawn.
This commit is contained in:
Lennart Poettering 2014-12-29 17:54:04 +01:00
parent f252d3fb2b
commit 814a3fdfdc

View File

@ -3132,10 +3132,6 @@ int main(int argc, char *argv[]) {
goto finish;
}
sd_notify(false,
"READY=1\n"
"STATUS=Container running.");
assert_se(sigemptyset(&mask) == 0);
sigset_add_many(&mask, SIGCHLD, SIGWINCH, SIGTERM, SIGINT, -1);
assert_se(sigprocmask(SIG_BLOCK, &mask, NULL) == 0);
@ -3519,6 +3515,10 @@ int main(int argc, char *argv[]) {
* control to the code to run inside the container. */
(void) barrier_place(&barrier);
sd_notify(false,
"READY=1\n"
"STATUS=Container running.");
r = sd_event_new(&event);
if (r < 0) {
log_error_errno(r, "Failed to get default event source: %m");