[CRIU] [PATCH 2/6] zdtm: Replace `ps -p` with `kill -0`
Andrew Vagin
avagin at parallels.com
Thu Aug 7 01:10:49 PDT 2014
On Wed, Aug 06, 2014 at 06:02:10PM -0400, Christopher Covington wrote:
> The -p argument to `ps` is not supported by Busybox v1.19.4. Sending
> signal 0 with the `kill` command is an alternative way to check
> whether a process is still running.
>
> http://www.linuxjournal.com/content/monitoring-processes-kill-0
Acked-by: Andrew Vagin <avagin at parallels.com>
>
> Signed-off-by: Christopher Covington <cov at codeaurora.org>
> ---
> test/zdtm.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/zdtm.sh b/test/zdtm.sh
> index 19f74da..55e333a 100755
> --- a/test/zdtm.sh
> +++ b/test/zdtm.sh
> @@ -403,7 +403,7 @@ start_test()
> [ -z "$PIDNS" ] || cd -
>
> PID=`cat "$TPID"` || return 1
> - if ! ps -p $PID ; then
> + if ! kill -0 $PID ; then
> echo "Test failed to start"
> return 1
> fi
> --
> Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> hosted by the Linux Foundation.
>
More information about the CRIU
mailing list