Add inotify watcher for container exits

This allows the container list API to return updated status
for exited container without having to call container status first.

Signed-off-by: Mrunal Patel <mpatel@redhat.com>
This commit is contained in:
Mrunal Patel 2017-08-12 18:35:55 -07:00
parent 8f735a581d
commit 30ded83096
7 changed files with 97 additions and 23 deletions

View file

@ -408,6 +408,10 @@ func main() {
// after the daemon is done setting up we can notify systemd api
notifySystem()
go func() {
service.StartExitMonitor()
}()
err = s.Serve(lis)
if graceful && strings.Contains(strings.ToLower(err.Error()), "use of closed network connection") {
err = nil