chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
435fdce
)
nspawn: pass the container's init PID out via sd_notify()
author
Lennart Poettering
<lennart@poettering.net>
Wed, 14 Jan 2015 22:29:01 +0000
(23:29 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 14 Jan 2015 22:29:01 +0000
(23:29 +0100)
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.
src/nspawn/nspawn.c
patch
|
blob
|
history
diff --git
a/src/nspawn/nspawn.c
b/src/nspawn/nspawn.c
index f502500308c42c4fb0405be4c011d899f6fdb861..2bda27edf07472a5e36650b488c2b43afbc5054b 100644
(file)
--- 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) {