 
 [patch ported to v219 -alban]
 [patch ported to git master 2015-05-20 -alban]
+[patch ported to git master 2015-05-21 -iaguis]
 ---
  src/nspawn/nspawn.c | 24 ++++++++++++++++++++++++
  1 file changed, 24 insertions(+)
 
 diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
-index a38f47d..869a864 100644
+index d6b24c6..be69172 100644
 --- a/src/nspawn/nspawn.c
 +++ b/src/nspawn/nspawn.c
 @@ -190,6 +190,7 @@ static bool arg_quiet = false;

 static void nop_handler(int sig) {}
 
 static int on_orderly_shutdown(sd_event_source *s, const struct signalfd_siginfo *si, void *userdata) {
@@ -4635,6 +4651,14 @@ int main(int argc, char *argv[]) {
                                 _cleanup_rtnl_unref_ sd_rtnl *rtnl = NULL;
                                 char last_char = 0;
 
+                                if (arg_pid_file) {
+                                        r = write_pid(arg_pid_file, pid);
+                                        if (r < 0) {
+                                                log_error_errno(r, "Failed to write pid file: %m");
+                                                goto finish;
+                                        }
+                                }
+
                                 sd_notifyf(false,
                                            "READY=1\n"
                                            "STATUS=Container running.\n"
-- 
2.1.4


                 case ARG_PERSONALITY:
 
                         arg_personality = personality_from_string(optarg);
@@ -3920,6 +3928,14 @@ static int wait_for_container(pid_t pid, ContainerStatus *container) {
         return r;
 }
 
