chiark / gitweb /
nspawn: move container wait logic into wait_for_container()
authorDjalal Harouni <tixxdz@opendz.org>
Sat, 24 May 2014 13:58:54 +0000 (14:58 +0100)
committerLennart Poettering <lennart@poettering.net>
Sun, 25 May 2014 03:23:30 +0000 (11:23 +0800)
Move the container wait logic into its own wait_for_container() function
and add two status codes: CONTAINER_TERMINATED or CONTAINER_REBOOTED.
The status will be stored in its argument, this way we handle:
a) Return negative on failures.
b) Return zero on success and set the status to either
   CONTAINER_REBOOTED or CONTAINER_TERMINATED.

These status codes are used to terminate nspawn or loop again in case of
CONTAINER_REBOOTED.


No differences found