diff options
author | Ian Jackson <ian.jackson@eu.citrix.com> | 2012-04-11 14:14:18 +0100 |
---|---|---|
committer | Ian Jackson <ian.jackson@eu.citrix.com> | 2012-04-11 14:14:18 +0100 |
commit | da31ffa712dbbe9540a7b9c2b7bee4d3315c1cd1 (patch) | |
tree | d9134fca3659e8a649f433d03f8aacc620101675 /tools/libxl/Makefile | |
parent | 88d3e27049298a53d9f9f5c8600d2799dc88ef7b (diff) | |
download | xen-da31ffa712dbbe9540a7b9c2b7bee4d3315c1cd1.tar.gz xen-da31ffa712dbbe9540a7b9c2b7bee4d3315c1cd1.tar.bz2 xen-da31ffa712dbbe9540a7b9c2b7bee4d3315c1cd1.zip |
libxl: Protect fds with CLOEXEC even with forking threads
We introduce a new "carefd" concept, which relates to fds that we care
about not being inherited by long-lived children.
As yet we do not use this anywhere in libxl. Until all locations in
libxl which make such fds are converted, libxl__postfork may not work
entirely properly. If these locations do not use O_CLOEXEC (or use
calls for which there is no O_CLOEXEC) then multithreaded programs may
not work properly.
This introduces a new API call libxl_postfork_child_noexec which must
be called by applications which make long-running non-execing
children. Add the appropriate call to xl's postfork function.
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/Makefile')
-rw-r--r-- | tools/libxl/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile index 9f7e454a55..e5ea867678 100644 --- a/tools/libxl/Makefile +++ b/tools/libxl/Makefile @@ -53,7 +53,7 @@ LIBXL_LIBS += -lyajl LIBXL_OBJS = flexarray.o libxl.o libxl_create.o libxl_dm.o libxl_pci.o \ libxl_dom.o libxl_exec.o libxl_xshelp.o libxl_device.o \ libxl_internal.o libxl_utils.o libxl_uuid.o libxl_json.o \ - libxl_qmp.o libxl_event.o $(LIBXL_OBJS-y) + libxl_qmp.o libxl_event.o libxl_fork.o $(LIBXL_OBJS-y) LIBXL_OBJS += _libxl_types.o libxl_flask.o _libxl_types_internal.o $(LIBXL_OBJS): CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore) $(CFLAGS_libblktapctl) -include $(XEN_ROOT)/tools/config.h |