Displaying 3 results from an estimated 3 matches for "95d910e7".
2019 Aug 02
0
[nbdkit PATCH v2 07/17] build: Audit for use of pipe2
...else
-# if defined SOCK_CLOEXEC || defined HAVE_MKOSTEMP
+# if defined SOCK_CLOEXEC || defined HAVE_MKOSTEMP || defined HAVE_PIPE2
# error "Unexpected: your system has incomplete atomic CLOEXEC support"
# endif
int f;
diff --git a/plugins/nbd/nbd.c b/plugins/nbd/nbd.c
index e8bc7798..95d910e7 100644
--- a/plugins/nbd/nbd.c
+++ b/plugins/nbd/nbd.c
@@ -431,11 +431,42 @@ nbdplug_open_handle (int readonly)
nbdkit_error ("malloc: %m");
return NULL;
}
+#ifdef HAVE_PIPE2
if (pipe2 (h->fds, O_NONBLOCK)) {
+ nbdkit_error ("pipe2: %m");
+ free (h);
+...
2019 Aug 02
0
[nbdkit PATCH v2 10/17] plugins: Add .fork_safe field
...6 +1365,7 @@ static struct nbdkit_plugin plugin = {
.extents = nbd_extents,
.cache = nbd_cache,
.errno_is_preserved = 1,
+ .fork_safe = 1, /* no use of fork() */
};
NBDKIT_REGISTER_PLUGIN (plugin)
diff --git a/plugins/nbd/nbd.c b/plugins/nbd/nbd.c
index 95d910e7..7762c9c0 100644
--- a/plugins/nbd/nbd.c
+++ b/plugins/nbd/nbd.c
@@ -861,6 +861,7 @@ static struct nbdkit_plugin plugin = {
.extents = nbdplug_extents,
.cache = nbdplug_cache,
.errno_is_preserved = 1,
+ .fork_safe = 1, /* libnbd uses fork() but not for URI...
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):