tools/xenstore: handle CLOEXEC flag for local files and pipes
authorJuergen Gross <jgross@suse.com>
Wed, 13 Jan 2021 13:00:19 +0000 (14:00 +0100)
committerJuergen Gross <jgross@suse.com>
Thu, 21 Jan 2021 16:31:37 +0000 (17:31 +0100)
commitcd831ee438471b9acd37582836d035d7d8aa7100
treed7884a4d3200544c262ff1bf13e3d6f098498c4b
parented6eebf17d2c8f7d6ac1c2bb23a2c92abf434074
tools/xenstore: handle CLOEXEC flag for local files and pipes

For support of live update the locally used files need to have the
"close on exec" flag set. Fortunately the used Xen libraries are
already doing this, so only the logging and tdb related files and
pipes are affected. openlog() has the close on exec attribute, too.

In order to be able to keep the event channels open specify the
XENEVTCHN_NO_CLOEXEC flag when calling xenevtchn_open().

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Julien Grall <julien.grall@amazon.com>
Acked-by: Wei Liu <wl@xen.org>
tools/xenstore/xenstored_control.c
tools/xenstore/xenstored_core.c
tools/xenstore/xenstored_core.h
tools/xenstore/xenstored_domain.c
tools/xenstore/xenstored_posix.c