From 0a9362f5745a58a3d63354d76182108ea81ecf05 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Tue, 23 Apr 2013 17:24:31 -0400 Subject: [PATCH] Support starting containers concurrently MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Trying to start multiple containers concurrently may cause lxc_monitor_read_timeout to fail as select call could be interrupted by a signal, handle it. Signed-off-by: S.Çağlar Onur Acked-by: Stéphane Graber --- src/lxc/state.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lxc/state.c b/src/lxc/state.c index 313cbb9ce..4ab131a4c 100644 --- a/src/lxc/state.c +++ b/src/lxc/state.c @@ -236,8 +236,11 @@ extern int lxc_wait(const char *lxcname, const char *states, int timeout, const goto out_close; curtime = tv.tv_sec; } - if (lxc_monitor_read_timeout(fd, &msg, timeout) < 0) - goto out_close; + if (lxc_monitor_read_timeout(fd, &msg, timeout) < 0) { + /* try again if select interrupted by signal */ + if (errno != EINTR) + goto out_close; + } if (timeout != -1) { retval = gettimeofday(&tv, NULL); -- 2.47.3