Displaying 7 results from an estimated 7 matches for "close_file_descriptors".
2014 Jul 25
3
[PATCH] launch: Close file descriptors after fork (RHBZ#1123007).
...it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -161,4 +161,18 @@ extern GUESTFS_DLL_PUBLIC int guestfs___add_libvirt_dom (guestfs_h *g, virDomain
# define program_name "libguestfs"
#endif
+/* Close all file descriptors matching the condition. */
+#define close_file_descriptors(cond) do { \
+ int max_fd = sysconf (_SC_OPEN_MAX); \
+ int fd; \
+ if (max_fd == -1) \
+ max_fd = 1024;...
2014 Jul 30
2
[PATCH v2] launch: Close file descriptors after fork (RHBZ#1123007).
https://bugzilla.redhat.com/show_bug.cgi?id=1123007
This is version 2 of the patch which avoids incorrectly closing
stderr, so we can still see debug and error messages.
Rich.
2017 Jun 10
1
[PATCH] lib: direct, uml: Unblock SIGTERM in the hypervisor and recovery processes (RHBZ#1460338).
...CLEANUP_FREE_STRING_LIST char **argv = NULL;
+ sigset_t sigset;
/* At present you must add drives before starting the appliance. In
* future when we enable hotplugging you won't need to do this.
@@ -728,6 +729,13 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
close_file_descriptors (fd > 2);
}
+ /* Unblock the SIGTERM signal since we will need to send that to
+ * the subprocess (RHBZ#1460338).
+ */
+ sigemptyset (&sigset);
+ sigaddset (&sigset, SIGTERM);
+ sigprocmask (SIG_UNBLOCK, &sigset, NULL);
+
/* Dump the command line (afte...
2014 Jul 28
1
Re: [PATCH] launch: Close file descriptors after fork (RHBZ#1123007).
...e it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -161,4 +161,18 @@ extern GUESTFS_DLL_PUBLIC int
guestfs___add_libvirt_dom (guestfs_h *g, virDomain
# define program_name "libguestfs"
#endif
+/* Close all file descriptors matching the condition. */
+#define close_file_descriptors(cond) do { \
+ int max_fd = sysconf (_SC_OPEN_MAX); \
+ int fd; \
+ if (max_fd == -1) \
+ max_fd = 1024;...
2016 Sep 08
4
[PATCH 0/3] Use gnulib's getprogname
Hi,
this series update libguestfs to a recent gnulib version, so that we
can use its new getprogname module, and solve altogether one of the
porting issues (the need for 'program_name' by the error module of
gnulib), and have a single way to get the name of the current program.
A number of changes in tools mostly, although mechanical.
Thanks,
Pino Toscano (3):
Update gnulib to latest
2017 Jun 09
12
[PATCH 00/12] Refactor utility functions.
This turned out to be rather more involved than I thought.
We have lots of utility functions, spread all over the repository,
with not a lot of structure. This moves many of them under common/
and structures them so there are clear dependencies.
This doesn't complete the job by any means. Other items I had on my
to-do list for this change were:
- Split up mllib/common_utils into:
-
2017 Jun 12
32
[PATCH v5 00/32] Refactor utilities, implement some APIs in OCaml.
This is a combination of:
https://www.redhat.com/archives/libguestfs/2017-June/msg00046.html
[PATCH 00/12] Refactor utility functions.
plus:
https://www.redhat.com/archives/libguestfs/2017-June/msg00023.html
[PATCH v3 00/19] Allow APIs to be implemented in OCaml.
with the second patches rebased on top of the utility refactoring, and
some other adjustments and extensions.
This passes