[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH] Download and run Dogtail script



> +               # download completed, run the test
> +               if not os.fork():
> +                   # we are in the child
> +                   os.chmod(testcase, 0755)
> +                   os.execv(testcase, [testcase])
> +                   sys.exit(0)
> +               else:
> +                   # we are in the parent, sleep to give time for the testcase to initialize
> +                   # todo: is this needed, how to avoid possible race conditions
> +                   time.sleep(1)

Probably cleaner here to os.waitpid() instead of sleeping, but it looks
fine otherwise.

We will probably also want to add a dogtail command to kickstart which
is very easy to do.

- Chris


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]