Reduce long-range code dependencies by not setting export_name in
run_command (--run functionality), especially as this function is not
always called.
If the -e option was not used at all then export_name will be NULL.
---
server/captive.c | 12 +---
1 file changed, 5 insertions(+), 7
Example after applying this patch:
$ ./nbdkit -fv --port -e foo null 1M
/home/rjones/d/nbdkit/server/nbdkit -f -v --port= -e foo --
/home/rjones/d/nbdkit/plugins/null/.libs/nbdkit-null-plugin.so 1M
nbdkit: debug: nbdkit 1.35.12
nbdkit: debug: TLS disabled: could not load TLS
This requires that nbdkit is built with the --run feature, which
(currently) is not true for Windows. (In some tests we separately
checked for !Windows, but let's favour consistency.)
---
plugins/rust/test-ramdisk.sh | 2 ++
tests/test-S3.sh | 1 +
---
tests/test-parallel-file.sh | 1 -
tests/test-parallel-nbd.sh | 1 -
tests/test-parallel-sh.sh | 1 -
3 files changed, 3 deletions(-)
diff --git a/tests/test-parallel-file.sh b/tests/test-parallel-file.sh
index 3cbaa2d46..add60007a 100755
--- a/tests/test-parallel-file.sh
+++
Almost always when you used nbdkit --run you should also use -U - (to
use a private Unix domain socket). Otherwise nbdkit listened on TCP
port 10809, which had two bad side effects: It permitted other
processes to interfere with your --run command, and it reserved a
public TCP port which would
XXX NOTE XXX
I would not apply this patch immediately, since online documentation
will get updated as soon as I do that. Best to wait until after 1.36
is released at least.
XXX END NOTE XXX
---
docs/nbdkit-captive.pod | 6 +++---
Should have done this a long time ago. I feel it is about time we
change the default of nbdkit --run to imply -U -, rather than opening
a public port.
Patch series turned out to be a little bit more complicated than I
anticipated, but it contains some nice clean ups.
Last patch updating the
This removes another long-range code dependency.
---
server/sockets.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/server/sockets.c b/server/sockets.c
index fe8b24409..d49b1755b 100644
--- a/server/sockets.c
+++ b/server/sockets.c
@@ -171,26 +171,26 @@
Previously there were two places where similiar-ish logic was used to
decide if we are going to serve over a socket activation, -s, Unix
socket, AF_VSOCK or TCP/IP. Let's abstract that into a service_mode.
One place where we did this was when calculating the $uri variable for
--run. This change
In tests where we used 'nbdkit -U - ... --run', remove -U - as that is
now implicit.
---
tests/Makefile.am| 2 +-
plugins/rust/test-ramdisk.sh | 4 +--
tests/test-S3.sh | 2 +-
tests/test-blkio.sh | 2 +-
Move the calculation of $uri to the main function (well, inlined
there), and out of --run code.
This is largely code motion. In theory it changes the content of $uri
since we now shell quote it after generating it, but this ought not to
have any practical effect.
---
server/internal.h | 1 +
11 matches
Mail list logo