Displaying 6 results from an estimated 6 matches for "c7b55ca1".
2020 Apr 28
2
[PATCH nbdkit] server: Fix parameters of lock_request, unlock_request
Patch itself is not controversial.
However I do wonder if we want to change all these constructs so that
instead of using #ifdef we use something like:
if (HAVE_PIPE2) {
// normal path
}
else {
// fallback
}
(It wouldn't actually work as written above because HAVE_PIPE2 is not
always defined, but you get the idea.)
This would allow us to test that the fallback paths still
2020 Apr 28
0
[PATCH nbdkit] server: Fix parameters of lock_request, unlock_request on fallback path.
...k_request
and unlock_request had not been made to this code and so it failed to
compile.
Fixes: commit 91023f269d4cea56f573a1aa0d880b12052f6e1e
---
server/connections.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/server/connections.c b/server/connections.c
index c7b55ca1..cc552b90 100644
--- a/server/connections.c
+++ b/server/connections.c
@@ -277,25 +277,25 @@ new_connection (int sockin, int sockout, int nworkers)
* non-atomicity okay.
*/
assert (thread_model <= NBDKIT_THREAD_MODEL_SERIALIZE_ALL_REQUESTS);
- lock_request (NULL);
+ lock_r...
2020 Apr 14
0
[nbdkit PATCH v2 2/3] server: Sanitize stdin/out before running plugin code
...+ dup2 (orig_out, STDOUT_FILENO) == -1) {
+ r = -1;
+ }
+ else
+ r = system (cmd);
if (r == -1) {
nbdkit_error ("failure to execute external command: %m");
r = EXIT_FAILURE;
diff --git a/server/connections.c b/server/connections.c
index c54c71c1..c7b55ca1 100644
--- a/server/connections.c
+++ b/server/connections.c
@@ -335,18 +335,6 @@ free_connection (struct connection *conn)
return;
conn->close ();
- if (listen_stdin) {
- int fd;
-
- /* Restore something to stdin/out so the rest of our code can
- * continue to assume that al...
2020 Apr 04
0
[nbdkit PATCH 2/2] server: Sanitize stdin/out before running plugin code
...+ dup2 (orig_out, STDOUT_FILENO) == -1) {
+ r = -1;
+ }
+ else
+ r = system (cmd);
if (r == -1) {
nbdkit_error ("failure to execute external command: %m");
r = EXIT_FAILURE;
diff --git a/server/connections.c b/server/connections.c
index c54c71c1..c7b55ca1 100644
--- a/server/connections.c
+++ b/server/connections.c
@@ -335,18 +335,6 @@ free_connection (struct connection *conn)
return;
conn->close ();
- if (listen_stdin) {
- int fd;
-
- /* Restore something to stdin/out so the rest of our code can
- * continue to assume that al...
2020 Apr 04
6
[nbdkit PATCH 0/2] stdin/out cleanups
This is what I've been playing with in response to my earlier question
about what to do with 'nbdkit -s sh -'
(https://www.redhat.com/archives/libguestfs/2020-April/msg00032.html)
I'm still open to ideas on a better name, and/or whether adding
<stdbool.h> to our public include files is a good idea (if not,
returning int instead of bool is tolerable).
Eric Blake (2):
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 |