[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxl: remove ctx->waitpid_instead
# HG changeset patch # User Ian Jackson <ian.jackson@xxxxxxxxxxxxx> # Date 1336759142 -3600 # Node ID 635eb1d6d43376c1897711ac6b7c012f453cca62 # Parent 0d642524dcabb76489aeb5105f8fe0aafcbd8d04 libxl: remove ctx->waitpid_instead Remove this obsolete hook. Callers inside libxl which create and reap children should use the mechanisms provided by the event system. (This has no functional difference since there is no way for ctx->waitpid_instead ever to become set.) Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Committed-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- diff -r 0d642524dcab -r 635eb1d6d433 tools/libxl/libxl_exec.c --- a/tools/libxl/libxl_exec.c Fri May 11 18:59:02 2012 +0100 +++ b/tools/libxl/libxl_exec.c Fri May 11 18:59:02 2012 +0100 @@ -19,11 +19,6 @@ #include "libxl_internal.h" -static int call_waitpid(pid_t (*waitpid_cb)(pid_t, int *, int), pid_t pid, int *status, int options) -{ - return (waitpid_cb) ? waitpid_cb(pid, status, options) : waitpid(pid, status, options); -} - static void check_open_fds(const char *what) { const char *env_debug; @@ -344,7 +339,7 @@ int libxl__spawn_spawn(libxl__gc *gc, if (!for_spawn) _exit(0); /* just detach then */ - got = call_waitpid(ctx->waitpid_instead, child, &status, 0); + got = waitpid(child, &status, 0); assert(got == child); rc = (WIFEXITED(status) ? WEXITSTATUS(status) : @@ -404,7 +399,7 @@ int libxl__spawn_detach(libxl__gc *gc, (unsigned long)for_spawn->intermediate); abort(); /* things are very wrong */ } - got = call_waitpid(ctx->waitpid_instead, for_spawn->intermediate, &status, 0); + got = waitpid(for_spawn->intermediate, &status, 0); assert(got == for_spawn->intermediate); if (!(WIFSIGNALED(status) && WTERMSIG(status) == SIGKILL)) { report_spawn_intermediate_status(gc, for_spawn, status); @@ -421,14 +416,13 @@ int libxl__spawn_detach(libxl__gc *gc, int libxl__spawn_check(libxl__gc *gc, libxl__spawn_starting *for_spawn) { - libxl_ctx *ctx = libxl__gc_owner(gc); pid_t got; int status; if (!for_spawn) return 0; assert(for_spawn->intermediate); - got = call_waitpid(ctx->waitpid_instead, for_spawn->intermediate, &status, WNOHANG); + got = waitpid(for_spawn->intermediate, &status, WNOHANG); if (!got) return 0; assert(got == for_spawn->intermediate); diff -r 0d642524dcab -r 635eb1d6d433 tools/libxl/libxl_internal.h --- a/tools/libxl/libxl_internal.h Fri May 11 18:59:02 2012 +0100 +++ b/tools/libxl/libxl_internal.h Fri May 11 18:59:02 2012 +0100 @@ -325,9 +325,6 @@ struct libxl__ctx { int sigchld_selfpipe[2]; /* [0]==-1 means handler not installed */ LIBXL_LIST_HEAD(, libxl__ev_child) children; - /* This is obsolete and must be removed: */ - int (*waitpid_instead)(pid_t pid, int *status, int flags); - libxl_version_info version_info; }; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |