<arg choice="opt">-r</arg>
<arg choice="opt">-t <replaceable>timeout</replaceable></arg>
<arg choice="opt">-k</arg>
- <arg choice="opt">-s</arg>
+ <arg choice="opt">--nokill</arg>
+ <arg choice="opt">--nolock</arg>
</cmdsynopsis>
</refsynopsisdiv>
the container), wait 60 seconds for the container to exit, and
returns. If the container fails to cleanly exit, then after 60
seconds the container will be sent the
- <command>lxc.stopsignal</command> to force it to shut down.
+ <command>lxc.stopsignal</command> to force it to shut down. If
+ <command>lxc.stopsignal</command> is not specified, the signal sent is
+ SIGKILL.
</para>
<para>
- The <optional>-W</optional>, <optional>-r</optional>, <optional>-s</optional>
- and <optional>-k</optional> options specify the action to perform.
+ The <optional>-W</optional>, <optional>-r</optional>,
+ <optional>-k</optional> and <optional>--nokill</optional>
+ options specify the action to perform.
<optional>-W</optional> indicates that after performing the specified
action, <command>lxc-stop</command> should immediately exit, while
<optional>-t TIMEOUT</optional> specifies the maximum amount of time
<varlistentry>
<term>
- <option>-s,--shutdown </option>
+ <option>-k,--kill </option>
</term>
<listitem>
<para>
- Only request a clean shutdown, do not kill the container tasks if the
- clean shutdown fails.
+ Rather than requesting a clean shutdown of the container, explicitly
+ kill all tasks in the container. This is the legacy
+ <command>lxc-stop</command> behavior.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
- <option>-k,--kill </option>
+ <option>--nokill</option>
</term>
<listitem>
<para>
- Rather than requesting a clean shutdown of the container, explicitly
- kill all tasks in the container. This is the legacy
- <command>lxc-stop</command> behavior.
+ Only request a clean shutdown, do not kill the container tasks if the
+ clean shutdown fails.
</para>
</listitem>
</varlistentry>
#include "utils.h"
#define OPT_NO_LOCK OPT_USAGE+1
+#define OPT_NO_KILL OPT_USAGE+2
static int my_parser(struct lxc_arguments* args, int c, char* arg)
{
case 'W': args->nowait = 1; break;
case 't': args->timeout = atoi(arg); break;
case 'k': args->hardstop = 1; break;
- case 's': args->shutdown = 1; break;
case OPT_NO_LOCK: args->nolock = 1; break;
+ case OPT_NO_KILL: args->nokill = 1; break;
}
return 0;
}
{"nowait", no_argument, 0, 'W'},
{"timeout", required_argument, 0, 't'},
{"kill", no_argument, 0, 'k'},
- {"shutdown", no_argument, 0, 's'},
+ {"no-kill", no_argument, 0, OPT_NO_KILL},
{"no-lock", no_argument, 0, OPT_NO_LOCK},
LXC_COMMON_OPTIONS
};
-t, --timeout=T wait T seconds before hard-stopping\n\
-k, --kill kill container rather than request clean shutdown\n\
--nolock Avoid using API locks\n\
- -s, --shutdown Only request clean shutdown, don't later force kill\n",
+ --nokill Only request clean shutdown, don't force kill after timeout\n",
.options = my_longopts,
.parser = my_parser,
.checker = NULL,
goto out;
}
- if (my_args.shutdown)
+ if (my_args.nokill)
my_args.timeout = 0;
s = c->shutdown(c, my_args.timeout);