From 59a6b9b15cfb53187bd32fa9b350533d34a4cd60 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Sat, 25 May 2019 17:25:08 -0500 Subject: [PATCH] nbd: Fix example in man page 'a=b && c&' creates a subshell, so the assignment to a does not persist to the next command. Rewrite the example to use distinct commands, so that $sock is not empty on the 'exec d' line. Signed-off-by: Eric Blake --- plugins/nbd/nbdkit-nbd-plugin.pod | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/nbd/nbdkit-nbd-plugin.pod b/plugins/nbd/nbdkit-nbd-plugin.pod index fe8797dd..913d1e52 100644 --- a/plugins/nbd/nbdkit-nbd-plugin.pod +++ b/plugins/nbd/nbdkit-nbd-plugin.pod @@ -59,7 +59,7 @@ Unix socket to TCP network clients that only want to consume encrypted data. Use I<--exit-with-parent> to clean up nbdkit at the same time that the old server exits. - ( sock=`mktemp -u` && + ( sock=`mktemp -u` nbdkit --exit-with-parent --tls=require nbd socket=$sock & exec /path/to/oldserver --socket=$sock ) @@ -72,7 +72,7 @@ qcow2 files (nbdkit does not have a native qcow2 plugin), performing the same task as the deprecated C command: - ( sock=`mktemp -u` && + ( sock=`mktemp -u` nbdkit --exit-with-parent --filter=partition nbd socket=$sock partition=1 & exec qemu-nbd -k $sock -f qcow2 /path/to/image.qcow2 ) -- 2.11.4.GIT