[CRIU] [PATCH 2/3] test: app-emu -- job: Fix comparison

Andrey Wagin avagin at gmail.com
Mon May 6 15:18:57 EDT 2013


On May 6, 2013 7:13 PM, "Cyrill Gorcunov" <gorcunov at openvz.org> wrote:
>
> Since we're migrating session leader here,
> test for session has not been changed instead.

In this case the test doesn't wait c/r. I don't like when sleep is used for
synchronization instead of sending a signal.

>
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  test/app-emu/job/job.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/app-emu/job/job.c b/test/app-emu/job/job.c
> index e01480a..5f334ff 100644
> --- a/test/app-emu/job/job.c
> +++ b/test/app-emu/job/job.c
> @@ -80,7 +80,7 @@ int main(int argc, char *argv[])
>                         exit(-1);
>                 }
>
> -               if (getsid(pid) != sid) {
> +               if (getsid(pid) == sid) {
>                         printf("ALIVE\n");
>                         break;
>                 }
> --
> 1.8.1.4
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20130506/b1882c6e/attachment.html>


More information about the CRIU mailing list