search for: launch_uml

Displaying 20 results from an estimated 24 matches for "launch_uml".

2014 Jul 25
3
[PATCH] launch: Close file descriptors after fork (RHBZ#1123007).
...riptors (1); /* It would be nice to be able to put this in the same process * group as qemu (ie. setpgid (0, qemu_pid)). However this is diff --git a/src/launch-uml.c b/src/launch-uml.c index 2a6ddaf..88c684b 100644 --- a/src/launch-uml.c +++ b/src/launch-uml.c @@ -333,6 +333,9 @@ launch_uml (guestfs_h *g, void *datav, const char *arg) goto dup_failed; close (csv[1]); + + /* RHBZ#1123007 */ + close_file_descriptors (fd >= 2 && fd != dsv[1]); } /* Dump the command line (after setting up stderr above). */ @@ -360,7 +363,7 @@ launch_uml (...
2017 Jun 10
1
[PATCH] lib: direct, uml: Unblock SIGTERM in the hypervisor and recovery processes (RHBZ#1460338).
...process * group as qemu (ie. setpgid (0, qemu_pid)). However this is * not possible because we don't have any guarantee here that diff --git a/lib/launch-uml.c b/lib/launch-uml.c index eccc102f5..547ab5a69 100644 --- a/lib/launch-uml.c +++ b/lib/launch-uml.c @@ -147,6 +147,7 @@ launch_uml (guestfs_h *g, void *datav, const char *arg) size_t i; struct hv_param *hp; char *term = getenv ("TERM"); + sigset_t sigset; if (!uml_supported (g)) return -1; @@ -323,6 +324,11 @@ launch_uml (guestfs_h *g, void *datav, const char *arg) close_file_descriptors (f...
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).
...criptors (1); /* It would be nice to be able to put this in the same process * group as qemu (ie. setpgid (0, qemu_pid)). However this is diff --git a/src/launch-uml.c b/src/launch-uml.c index 2a6ddaf..88c684b 100644 --- a/src/launch-uml.c +++ b/src/launch-uml.c @@ -333,6 +333,9 @@ launch_uml (guestfs_h *g, void *datav, const char *arg) goto dup_failed; close (csv[1]); + + /* RHBZ#1123007 */ + close_file_descriptors (fd >= 2 && fd != dsv[1]); } /* Dump the command line (after setting up stderr above). */ @@ -360,7 +363,7 @@ launch_uml (gu...
2014 Jan 27
1
Re: [PATCH INCOMPLETE] Rewrite virt-make-fs in C (originally Perl).
...**pipef) > +{ Reading this and other similar implementations, for example: - fish/events.c, do_event_handler - fish/fish.c, execute_and_inline and issue_command (which has a comment regarding pipe commands) - src/command.c, run_command - src/launch-direct.c, launch_direct - src/launch-uml.c, launch_uml - daemon/guestfsd.c, commandrf (maybe, since it is in the appliance); other popen usages in daemon/* what about using libpipeline [1] to handle them? While it adds the overhead of a new shared library (although using just libc, and ~55kb in my f19/x86_64 installation), should help a bit in spa...
2013 Sep 06
1
[PATCH] arm: appliance: Add support for device trees (dtb's).
This is the libguestfs companion patch to: https://www.redhat.com/archives/libguestfs/2013-September/msg00045.html Rich.
2015 Jun 25
2
[PATCH] launch: rework handling of --enable-valgrind-daemon
...INE_VALGRIND_DAEMON; +#endif cmdline = guestfs_int_appliance_command_line (g, params->appliance_dev, flags); start_element ("os") { diff --git a/src/launch-uml.c b/src/launch-uml.c index 785548c..1d92b5e 100644 --- a/src/launch-uml.c +++ b/src/launch-uml.c @@ -269,12 +269,14 @@ launch_uml (guestfs_h *g, void *datav, const char *arg) #if 0 /* XXX This could be made to work. */ #ifdef VALGRIND_DAEMON - /* Set up virtio-serial channel for valgrind messages. */ - ADD_CMDLINE ("-chardev"); - ADD_CMDLINE_PRINTF ("file,path=%s/valgrind.log.%d,id=valgrind", -...
2016 Mar 22
0
[PATCH v3 09/11] launch: Remove guestfs_int_print_timestamped_message function.
...is up"); /* This is possible in some really strange situations, such as * guestfsd starts up OK but then qemu immediately exits. Check for diff --git a/src/launch-uml.c b/src/launch-uml.c index 1c2fd02..318081c 100644 --- a/src/launch-uml.c +++ b/src/launch-uml.c @@ -446,8 +446,7 @@ launch_uml (guestfs_h *g, void *datav, const char *arg) goto cleanup1; } - if (g->verbose) - guestfs_int_print_timestamped_message (g, "appliance is up"); + debug (g, "appliance is up"); /* This is possible in some really strange situations, such as * guestfsd st...
2014 Jan 16
3
[PATCH 0/2] Don't use snapshot=on
QEMU upstream has broken snapshot=on ... again. These two patches stop using it entirely. Instead we run 'qemu-img create' to create overlay disks as required. Note that the libvirt and UML backends were already doing this: The libvirt backend because <transient/> has never worked, and the UML backend was running uml_mkcow because the UML-equivalent syntax of snapshot=on was
2016 Apr 14
0
[PATCH] Add safe wrapper around waitpid which deals with EINTR correctly.
...h-uml.c index 318081c..8c48795 100644 --- a/src/launch-uml.c +++ b/src/launch-uml.c @@ -26,7 +26,6 @@ #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> -#include <sys/wait.h> #include <sys/signal.h> #include <libintl.h> @@ -470,8 +469,8 @@ launch_uml (guestfs_h *g, void *datav, const char *arg) close (dsv[0]); if (data->pid > 0) kill (data->pid, SIGKILL); if (data->recoverypid > 0) kill (data->recoverypid, SIGKILL); - if (data->pid > 0) waitpid (data->pid, NULL, 0); - if (data->recoverypid > 0) wait...
2015 Jun 25
0
[PATCH v2 1/9] build: Remove ./configure --enable-valgrind-daemon.
...*/ - char buf[1]; - g->conn->ops->read_data (g, g->conn, buf, sizeof buf); - } -#endif } /* Shut down the backend. */ diff --git a/src/launch-uml.c b/src/launch-uml.c index 785548c..6a63b6b 100644 --- a/src/launch-uml.c +++ b/src/launch-uml.c @@ -267,17 +267,6 @@ launch_uml (guestfs_h *g, void *datav, const char *arg) ADD_CMDLINE_PRINTF ("ssl3=fd:%d", dsv[1]); ADD_CMDLINE ("guestfs_channel=/dev/ttyS3"); -#if 0 /* XXX This could be made to work. */ -#ifdef VALGRIND_DAEMON - /* Set up virtio-serial channel for valgrind messages. */ - ADD_CM...
2016 Apr 14
2
[PATCH] Add safe wrapper around waitpid which deals with EINTR correctly.
As Eric Blake noted in: https://www.redhat.com/archives/libguestfs/2016-April/msg00154.html libguestfs doesn't correctly handle the case where waitpid receives a SIGCHLD signal and the main program has registered a non-restartable signal handler. In this case waitpid would return -EINTR and we would print an error, but actually we should retry this case. This adds two new internal functions,
2015 Sep 29
1
[PATCH] [repost] build: Remove ./configure --enable-valgrind-daemon.
Previously posted here: https://www.redhat.com/archives/libguestfs/2015-June/msg00266.html 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
2015 Nov 09
6
[PATCH 0/5] build: Enable some more warnings.
Add some warnings. Well, the first patch is a miscellaneous change, but patches 2-5 add some warnings. Rich.
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers. These aren't valid for global names in C++. (http://stackoverflow.com/a/228797) These large but completely mechanical patches change the illegal identifiers to legal ones. Rich.
2015 Jun 23
10
[PATCH 0/7] Better testing of the guestfsd daemon.
Currently we are unable to properly run guestfsd (the daemon) under valgrind. Attempts to run valgrind inside the appliance have not been successful (see patch 1/7). However we desperately need better valgrind coverage of the daemon, particularly because it is doing a lot of complex parsing of program output. This has been a problem for a long time. A better way to attack this problem is to
2015 Jun 25
13
[PATCH v2 0/9] Better testing of the guestfsd daemon.
In v2: - Kernel command line parsing now moved to the appliance. - In the captive daemon test, the daemon cleanly shuts down on exit. - Add another btrfs test. Rich.
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
...ge in /etc/qemu/bridge.conf.\n" "For further information see guestfs(3)."), - brname); + brname); return -1; } diff --git a/src/launch-uml.c b/src/launch-uml.c index 8171ff0..2ec7022 100644 --- a/src/launch-uml.c +++ b/src/launch-uml.c @@ -200,9 +200,9 @@ launch_uml (guestfs_h *g, void *datav, const char *arg) * forking, because after fork we are not allowed to use * non-signal-safe functions such as malloc. */ -#define ADD_CMDLINE(str) \ +#define ADD_CMDLINE(str) \ guestfs_int_add_string (g, &cmdline, (str)) -#define ADD_CMDLINE_PRINTF(fs...