search for: saved_stdin

Displaying 6 results from an estimated 6 matches for "saved_stdin".

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
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 Aug 05
2
[PATCH nbdkit 1/2] server: Call .get_ready before redirecting stdin/stdout to /dev/null.
VDDK plugin + --run was broken because of the following sequence of events: (1) After .config_complete, server redirects stdin/stdout to /dev/null. (2) Server then calls vddk_get_ready which reexecs. (3) We restart the server from the top, but with stdin/stdout redirected to /dev/null. So saved_stdin/saved_stdout save /dev/null. (4) run_command is called which "restores" /dev/null as stdin/stdout. (5) The output of the --run option is sent to /dev/null. In addition to fixing this problem with VDDK, it also makes general sense not to redirect stdin/stdout before calling .get_rea...
2020 Jul 10
0
[RFC nbdkit PATCH] server: Allow --run with --vsock
.... If diff --git a/server/internal.h b/server/internal.h index 68c53366..1dd84ccb 100644 --- a/server/internal.h +++ b/server/internal.h @@ -129,6 +129,7 @@ extern bool tls_verify_peer; extern char *unixsocket; extern const char *user, *group; extern bool verbose; +extern bool vsock; extern int saved_stdin; extern int saved_stdout; diff --git a/server/captive.c b/server/captive.c index f8107604..a5b227c4 100644 --- a/server/captive.c +++ b/server/captive.c @@ -72,7 +72,7 @@ run_command (void) /* Construct $uri. */ fprintf (fp, "uri="); if (port) { - fprintf (fp, "nbd://lo...
2020 Apr 14
6
[nbdkit PATCH v2 0/3] more consistent stdin/out handling
In v2: - use int instead of bool in the public header - split the tests from the code - don't overload test-layers; instead, add new tests - add a missing fflush exposed by the new tests - other minor cleanups Eric Blake (3): server: Add nbdkit_stdio_safe server: Sanitize stdin/out before running plugin code server: More tests of stdin/out handling docs/nbdkit-plugin.pod |
2020 Jun 22
4
[PATCH nbdkit 1/2] server: Add .after_fork callback, mainly for plugins to create threads.
...top->after_fork (top); accept_incoming_connections (&socks); return; } @@ -967,6 +968,7 @@ start_serving (void) if (listen_stdin) { change_user (); write_pidfile (); + top->after_fork (top); threadlocal_new_server_thread (); handle_single_connection (saved_stdin, saved_stdout); return; @@ -986,6 +988,7 @@ start_serving (void) change_user (); fork_into_background (); write_pidfile (); + top->after_fork (top); accept_incoming_connections (&socks); } diff --git a/server/plugins.c b/server/plugins.c index fa572a6a..285569bb 100644 -...