aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxl_internal.c
diff options
context:
space:
mode:
authorAnthony Perard <anthony.perard@citrix.com>2011-12-01 16:28:51 +0000
committerAnthony Perard <anthony.perard@citrix.com>2011-12-01 16:28:51 +0000
commit943730ecffa8807ebb5c47f01a686e021f3c0390 (patch)
tree66e5b8bea2d66a8d16d90024f8e05ce7641bb86b /tools/libxl/libxl_internal.c
parentca3a3fefd27cc398b5a08c865d7cb16628f388fb (diff)
downloadxen-943730ecffa8807ebb5c47f01a686e021f3c0390.tar.gz
xen-943730ecffa8807ebb5c47f01a686e021f3c0390.tar.bz2
xen-943730ecffa8807ebb5c47f01a686e021f3c0390.zip
xl: Apply CLOEXEC to the restore_fd.
At restore time, the file descriptor opened on the migration state file is still open in the device model. Let's apply FD_CLOEXEC to it. This patch provides libxl_fd_set_cloexec to users of libxl, instead of keeping this function internal. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_internal.c')
-rw-r--r--tools/libxl/libxl_internal.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c
index 34edaf384d..028f90f74b 100644
--- a/tools/libxl/libxl_internal.c
+++ b/tools/libxl/libxl_internal.c
@@ -306,19 +306,6 @@ _hidden int libxl__compare_macs(libxl_mac *a, libxl_mac *b)
return 0;
}
-int libxl__fd_set_cloexec(int fd)
-{
- int flags = 0;
-
- if ((flags = fcntl(fd, F_GETFD)) == -1) {
- flags = 0;
- }
- if ((flags & FD_CLOEXEC)) {
- return 0;
- }
- return fcntl(fd, F_SETFD, flags | FD_CLOEXEC);
-}
-
libxl_device_model_version libxl__device_model_version_running(libxl__gc *gc,
uint32_t domid)
{