Unverified Commit 0a9362f5 by S.Çağlar Onur Committed by Stéphane Graber

Support starting containers concurrently

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 avatarS.Çağlar Onur <caglar@10ur.org> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 15451ecf
...@@ -236,8 +236,11 @@ extern int lxc_wait(const char *lxcname, const char *states, int timeout, const ...@@ -236,8 +236,11 @@ extern int lxc_wait(const char *lxcname, const char *states, int timeout, const
goto out_close; goto out_close;
curtime = tv.tv_sec; curtime = tv.tv_sec;
} }
if (lxc_monitor_read_timeout(fd, &msg, timeout) < 0) if (lxc_monitor_read_timeout(fd, &msg, timeout) < 0) {
goto out_close; /* try again if select interrupted by signal */
if (errno != EINTR)
goto out_close;
}
if (timeout != -1) { if (timeout != -1) {
retval = gettimeofday(&tv, NULL); retval = gettimeofday(&tv, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment