Displaying 14 results from an estimated 14 matches for "set_up_quit_pipe".
2019 Nov 04
3
[PATCH nbdkit v2 0/2] Implement fuzzing using Clang's libFuzzer.
v1 was here:
https://www.redhat.com/archives/libguestfs/2019-November/msg00003.html
This version depends on:
https://www.redhat.com/archives/libguestfs/2019-November/msg00004.html
and this series:
https://www.redhat.com/archives/libguestfs/2019-November/msg00009.html
The delta has been reduced slightly because of changes made possible
by cleaning up and fixing the quit path in nbdkit. It's
2020 Feb 22
2
Re: Plans for nbdkit 1.18 release?
Eric:
Did you want to take this one any further? It might be one that we
save for > 1.18:
https://www.redhat.com/archives/libguestfs/2020-February/thread.html#00206
Another thing I've been thinking about for some time is splitting
.config_complete into .config_complete + .get_ready (new name TBD).
At the moment .config_complete is both the place where we finish
processing config, and
2019 Aug 02
0
[nbdkit PATCH v2 07/17] build: Audit for use of pipe2
...gt;
#include <stdarg.h>
@@ -39,6 +40,7 @@
#include <unistd.h>
#include "internal.h"
+#include "utils.h"
/* Detection of request to exit via signal. Most places in the code
* can just poll quit at opportune moments, while sockets.c needs a
@@ -54,10 +56,26 @@ set_up_quit_pipe (void)
{
int fds[2];
+#ifdef HAVE_PIPE2
+ if (pipe2 (fds, O_CLOEXEC) < 0) {
+ perror ("pipe2");
+ exit (EXIT_FAILURE);
+ }
+#else
+ /* This is called early enough that no other thread will be
+ * fork()ing while we create this; but we must set CLOEXEC so that
+ * the...
2019 Nov 02
2
[PATCH nbdkit 0/2] Implement fuzzing using Clang's libFuzzer.
libFuzzer is Clang's fuzzer, and alternative to using AFL:
https://llvm.org/docs/LibFuzzer.html
I implemented an alternative method of fuzzing for libnbd earlier
today and it's pretty simple:
https://github.com/libguestfs/libnbd/commit/c19a6fbae9a21a7d4693418706c59e81ed256875
However it's considerably more difficult to use libFuzzer with
non-library code -- in this case nbdkit.
2020 Feb 22
1
Re: Plans for nbdkit 1.18 release?
...ged, 23 insertions(+), 23 deletions(-)
diff --git a/server/main.c b/server/main.c
index 8aa8b497..3bc59781 100644
--- a/server/main.c
+++ b/server/main.c
@@ -671,10 +671,25 @@ main (int argc, char *argv[])
/* Select the correct thread model based on config. */
lock_init_thread_model ();
- set_up_quit_pipe ();
-#if !ENABLE_LIBFUZZER
- set_up_signals ();
-#endif
+ /* If the user has mixed up -p/--run/-s/-U/--vsock options, then
+ * give an error.
+ *
+ * XXX Actually the server could easily be extended to handle both
+ * TCP/IP and Unix sockets, or even multiple TCP/IP ports.
+ */
+ if ((...
2020 Mar 26
0
[PATCH nbdkit 5/9 patch split 5/5] server: Indirect slow path, non-self-contained functions through the server.
...-48,6 +48,7 @@ libnbdkit_la_SOURCES = \
parse.c \
password.c \
path.c \
+ slow.c \
vfprintf.c \
$(NULL)
diff --git a/server/internal.h b/server/internal.h
index a3f4d1f1..9ef0b066 100644
--- a/server/internal.h
+++ b/server/internal.h
@@ -153,6 +153,7 @@ extern int quit_fd;
extern void set_up_quit_pipe (void);
extern void close_quit_pipe (void);
extern void handle_quit (int sig);
+extern void do_nbdkit_shutdown (void);
/* signals.c */
extern void set_up_signals (void);
@@ -473,6 +474,7 @@ extern int backend_cache (struct backend *b,
extern struct backend *plugin_register (size_t index, con...
2019 Jan 14
6
[PATCH nbdkit incomplete 0/5] Port to Windows.
This is an incomplete port to Windows. Currently the server compiles
and starts up successfully, but goes into an infinite loop when you
connect to it. Nevertheless I think the approach is ready for
feedback. This being Windows the changes go quite deep.
Rich.
2020 Aug 15
3
[PATCH EXPERIMENTAL nbdkit 0/2] Port to Windows using mingw.
The patches following do indeed allow you to compile nbdkit.exe, but
it does not actually work yet. I'm posting this experimental series
more as a work in progress and to get feedback.
Note this does not require Windows itself to build or test. You can
cross-compile it using mingw64-* packages on Fedora or Debian, and
test it [spoiler alert: it fails] using Wine.
Rich.
2019 Jul 31
13
[nbdkit PATCH 0/8] fd leak safety
There's enough here to need a review; some of it probably needs
backporting to stable-1.12.
This probably breaks tests on Haiku or other platforms that have not
been as on-the-ball about atomic CLOEXEC; feel free to report issues
that arise, and I'll help come up with workarounds (even if we end up
leaving a rare fd leak on less-capable systems).
Meanwhile, I'm still working on my
2020 Aug 18
15
[PATCH nbdkit 0/9] Port to Windows.
Also available here:
https://github.com/rwmjones/nbdkit/tree/2020-windows-mingw
This is the port to Windows using native Windows APIs (not MSYS or
Cygwin).
This patch series is at the point where it basically now works. I can
run the server with the memory plugin, and access it remotely using
guestfish, creating filesystems and so on without any apparent
problems.
Nevertheless there are many
2020 Aug 20
15
[PATCH nbdkit 0/13] Port to Windows without using a separate library.
Also available here:
https://github.com/rwmjones/nbdkit/tree/2020-windows-mingw-nolib
After a lot of work I have made the port to Windows work without using
a separate library. Instead, on Windows only, we build an "import
library" (library of stubs) which resolves references to nbdkit_*
functions in the main program and fixes up the plugin, basically the
first technique outlined in
2020 Mar 26
9
[PATCH nbdkit 5/9 patch split 1/5] Create libnbdkit.so.
This is the previous 5/9 patch posted earlier today, split into
reviewable chunks. This passes bisection with -x 'make && make
check', but I didn't work very hard on the commit messages, so I refer
you back to the original patch to explain how it works:
https://www.redhat.com/archives/libguestfs/2020-March/msg00248.html
Rich.
2019 Aug 02
23
[nbdkit PATCH v2 00/17] fd leak safety
This is a major rewrite compared to my v1 series, where I've tried
a lot harder to ensure that we still accommodate building on Haiku
(although I have not actually yet fired up a Haiku VM to try it
for myself). I also managed to make the sh plugin fully parallel,
on capable platforms.
See also my question on patch 10 on whether I've picked the best
naming convention.
Eric Blake (17):
2020 Mar 26
15
[PATCH nbdkit 0/9] Create libnbdkit.so
This creates libnbdkit.so as discussed in the following thread:
https://www.redhat.com/archives/libguestfs/2020-March/thread.html#00203
test-delay-shutdown.sh fails for unclear reasons.
This series starts by reverting "tests: Don't strand hung nbdkit
processes" which is because several other tests fail randomly unless I
revert this patch. I didn't investigate this yet so it