diff options
author | Ian Jackson <ian.jackson@eu.citrix.com> | 2012-05-11 18:59:06 +0100 |
---|---|---|
committer | Ian Jackson <ian.jackson@eu.citrix.com> | 2012-05-11 18:59:06 +0100 |
commit | 2fe033acfc82d768fd7b91016bc6205e1c44d7a3 (patch) | |
tree | 796ddfb68ed4298f01699b8c0bc60e97fa6d11f2 /tools/libxl/libxl_utils.h | |
parent | 99e96537fdac1d2ca36d6ce60532eebd3ae52657 (diff) | |
download | xen-2fe033acfc82d768fd7b91016bc6205e1c44d7a3.tar.gz xen-2fe033acfc82d768fd7b91016bc6205e1c44d7a3.tar.bz2 xen-2fe033acfc82d768fd7b91016bc6205e1c44d7a3.zip |
libxl: child processes cleanups
Abolish libxl_fork. Its only callers were in xl. Its functionality
is now moved elsewhere, as follows:
* The "logging version of fork", which is what it was billed as, is now
xl_fork, which also dies on failure.
* Closing the xenstore handle in the child is now done in
libxl__ev_child_fork, which is the only remaining place where fork
is called in libxl.
* We provide a new function libxl__ev_child_xenstore_reopen for
in-libxl children to make the ctx useable for xenstore again.
* Consequently libxl__spawn_record_pid now no longer needs to mess
about with its own xenstore handle. As a bonus it can now just use
libxl__xs_write.
Also, since we have now converted all the forkers in libxl, we can
always honour the fork_replacement childproc hook - so do so.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_utils.h')
-rw-r--r-- | tools/libxl/libxl_utils.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/libxl/libxl_utils.h b/tools/libxl/libxl_utils.h index 2b47622171..74beb52a67 100644 --- a/tools/libxl/libxl_utils.h +++ b/tools/libxl/libxl_utils.h @@ -47,9 +47,8 @@ int libxl_write_exactly(libxl_ctx *ctx, int fd, const void *data, * logged using filename (which is only used for logging) and what * (which may be 0). */ -pid_t libxl_fork(libxl_ctx *ctx); int libxl_pipe(libxl_ctx *ctx, int pipes[2]); - /* Just like fork(2), pipe(2), but log errors. */ + /* Just like pipe(2), but log errors. */ void libxl_report_child_exitstatus(libxl_ctx *ctx, xentoollog_level, const char *what, pid_t pid, int status); |