When we use lxc-ps to show the process, it's more appropriate to
show process when container is frozen.
Signed-off-by: Weng Meiling <wengmeiling.weng@huawei.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
container_field_width=${#container}
fi
- if lxc-info -P $lxc_path -t RUNNING -n $container; then
+ if ! lxc-info -P $lxc_path -t STOPPED -n $container; then
initpid=`lxc-info -P $lxc_path -p -n $container | awk -F: '{ print $2 }' | awk '{ print $1 }'`
cgroup=`head -n 1 /proc/$initpid/cgroup | awk -F: '{ print $3}'`
if [ -f "$parent_cgroup/$cgroup/tasks" ]; then