Commit 25070b66 by Serge Hallyn

lxc-stop: don't set timeout if user requested -s

A timeout means wait this long before killing the container. -s means don't kill the container. timeout defaults to 60 seconds. So if a shutdown is requested, then set timeout to 0. Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
parent 4878dac4
......@@ -151,8 +151,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
</term>
<listitem>
<para>
Wait TIMEOUT seconds before hard-stopping the container of (in
the reboot case) returning failure.
Wait TIMEOUT seconds before hard-stopping the container.
</para>
</listitem>
</varlistentry>
......
......@@ -175,6 +175,9 @@ int main(int argc, char *argv[])
goto out;
}
if (my_args.shutdown)
my_args.timeout = 0;
s = c->shutdown(c, my_args.timeout);
if (!s) {
if (!my_args.shutdown)
......
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