debuggers.hg
changeset 20832:9f4c6b96bd7f
libxenlight: typo in old patch, lead to waitpid forever instead of
waitpid with WNOHANG
fixes qemu starting problem
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
waitpid with WNOHANG
fixes qemu starting problem
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Tue Jan 12 07:04:46 2010 +0000 (2010-01-12) |
parents | 6ae90d7f7f45 |
children | da6cddd20000 |
files | tools/libxl/libxl_exec.c |
line diff
1.1 --- a/tools/libxl/libxl_exec.c Tue Jan 12 07:03:54 2010 +0000 1.2 +++ b/tools/libxl/libxl_exec.c Tue Jan 12 07:04:46 2010 +0000 1.3 @@ -45,7 +45,7 @@ static pid_t libxl_fork(struct libxl_ctx 1.4 1.5 static int call_waitpid(pid_t (*waitpid_cb)(pid_t, int *, int), pid_t pid, int *status, int options) 1.6 { 1.7 - return (waitpid_cb) ? waitpid_cb(pid, status, 0) : waitpid(pid, status, 0); 1.8 + return (waitpid_cb) ? waitpid_cb(pid, status, options) : waitpid(pid, status, options); 1.9 } 1.10 1.11 void libxl_exec(struct libxl_ctx *ctx, int stdinfd, int stdoutfd, int stderrfd, 1.12 @@ -202,7 +202,7 @@ int libxl_spawn_check(struct libxl_ctx * 1.13 if (!for_spawn) return 0; 1.14 1.15 assert(for_spawn->intermediate); 1.16 - got = call_waitpid(ctx->waitpid_instead, for_spawn->intermediate, &status, 0); 1.17 + got = call_waitpid(ctx->waitpid_instead, for_spawn->intermediate, &status, WNOHANG); 1.18 if (!got) return 0; 1.19 1.20 assert(got == for_spawn->intermediate);