diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-01-14 23:29:01 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-01-14 23:29:01 +0100 |
commit | 733d15ac7a23c80f2e447f6c2fca0406bc9960db (patch) | |
tree | 463c0cfe844b0c3e577ce5db8f7f82870f007e48 /src | |
parent | 435fdcef52087b99a2bef745eb07a1228ed6d993 (diff) |
nspawn: pass the container's init PID out via sd_notify()
This is useful for nspawn managers that want to learn when nspawn is
finished with initialiuzation, as well what the PID of the init system
in the container is.
Diffstat (limited to 'src')
-rw-r--r-- | src/nspawn/nspawn.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index f502500308..2bda27edf0 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -3947,9 +3947,10 @@ int main(int argc, char *argv[]) { _cleanup_rtnl_unref_ sd_rtnl *rtnl = NULL; char last_char = 0; - sd_notify(false, - "READY=1\n" - "STATUS=Container running."); + sd_notifyf(false, + "READY=1\n" + "STATUS=Container running.\n" + "X_NSPAWN_LEADER_PID=" PID_FMT, pid); r = sd_event_new(&event); if (r < 0) { |