search for: dup_fail

Displaying 7 results from an estimated 7 matches for "dup_fail".

Did you mean: up_fail
2014 Jul 25
3
[PATCH] launch: Close file descriptors after fork (RHBZ#1123007).
...\ + } while (0) + #endif /* GUESTFS_INTERNAL_FRONTEND_H_ */ diff --git a/src/launch-direct.c b/src/launch-direct.c index bb73d19..104809d 100644 --- a/src/launch-direct.c +++ b/src/launch-direct.c @@ -717,6 +717,13 @@ launch_direct (guestfs_h *g, void *datav, const char *arg) goto dup_failed; close (sv[1]); + + /* Close any other file descriptors that we don't want to pass + * to qemu. This prevents file descriptors which didn't have + * O_CLOEXEC set properly from leaking into the subprocess. See + * RHBZ#1123007. + */ + close_fil...
2009 Aug 19
1
[PATCH] Correct checks for dup failure in guestfs_launch
...c/guestfs.c +++ b/src/guestfs.c @@ -1165,16 +1165,16 @@ guestfs_launch (guestfs_h *g) close (wfd[1]); close (rfd[0]); - int fail = 0; - fail |= dup (wfd[0]); - fail |= dup (rfd[1]); - close (wfd[0]); - close (rfd[1]); - - if (fail) { + if (dup (wfd[0]) == -1) { + dup_failed: perror ("dup failed"); _exit (1); } + if (dup (rfd[1]) == -1) + goto dup_failed; + + close (wfd[0]); + close (rfd[1]); #if 0 /* Set up a new process group, so we can signal this process -- 1.6.2.5
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.
2014 Jul 28
1
Re: [PATCH] launch: Close file descriptors after fork (RHBZ#1123007).
...\ + } while (0) + #endif /* GUESTFS_INTERNAL_FRONTEND_H_ */ diff --git a/src/launch-direct.c b/src/launch-direct.c index bb73d19..104809d 100644 --- a/src/launch-direct.c +++ b/src/launch-direct.c @@ -717,6 +717,13 @@ launch_direct (guestfs_h *g, void *datav, const char *arg) goto dup_failed; close (sv[1]); + + /* Close any other file descriptors that we don't want to pass + * to qemu. This prevents file descriptors which didn't have + * O_CLOEXEC set properly from leaking into the subprocess. See + * RHBZ#1123007. + */ + close_file...
2013 Mar 07
4
[PATCH 0/4] Small refactorings of the protocol layer.
As the start of work to add remote support, I'm taking a close look at the protocol layer in the library. These are some small cleanups. Rich.
2013 Aug 09
4
[PATCH v2 0/4] Experimental User-Mode Linux backend.
v1 was here: https://www.redhat.com/archives/libguestfs/2013-August/msg00005.html This now works, to some extent. The main problem now is that devices are named /dev/ubd[a-] which of course confuses everything. I'm thinking it may be easier to add a udev rule to rename them. Rich.
2013 Aug 09
5
[PATCH 0/4] Not quite working User-Mode Linux backend.
This is a User-Mode Linux backend for libguestfs. You can select it by doing: export LIBGUESTFS_BACKEND=uml export LIBGUESTFS_QEMU=/path/to/vmlinux Note we're reusing the 'qemu' variable in the handle for convenience. QEmu is not involved when using the UML backend. This almost works. UML itself crashes when the daemon tries to connect to the serial port. I suspect it's