search for: libnbdxxx

Displaying 3 results from an estimated 3 matches for "libnbdxxx".

2019 Sep 27
0
Re: [PATCH libnbd 2/2] api: Implement local command with systemd socket activation.
...vation has two modes -- one where you pass an already accepted socket, and one where you pass a listening socket and the server accepts connections until it is killed. In nbdkit and qemu-nbd we are using the latter one. ... > If we fail here or later, do/should we try to clean up the > /tmp/libnbdXXX directory created earlier? > > /me reads ahead - nbd_close tries to address it > > Still, if we fail at this point, h->sa_sockpath is set but not yet > created [1] I modified the code so that it doesn't try to delete literal /tmp/libnbdXXXXXX on some error paths and should...
2019 Sep 26
2
Re: [PATCH libnbd 2/2] api: Implement local command with systemd socket activation.
...e must ensure the path is > + * short enough to store in the sockaddr_un. On some platforms this > + * may cause problems so we may need to revisit it. XXX > + */ Is the use of socketpair() any better than creating a socket under /tmp? > + h->sa_tmpdir = strdup ("/tmp/libnbdXXXXXX"); > + h->sa_sockpath = strdup ("/tmp/libnbdXXXXXX/sock"); > + if (h->sa_tmpdir == NULL || h->sa_sockpath == NULL) { > + SET_NEXT_STATE (%.DEAD); > + set_error (errno, "strdup"); > + return 0; > + } > + > + if (mkdtemp (h-&gt...
2019 Sep 26
5
[PATCH libnbd 1/2] lib: Avoid killing subprocess twice.
If the user calls nbd_kill_subprocess, we shouldn't kill the process again when we close the handle (since the process has likely gone and we might be killing a different process). --- lib/handle.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/handle.c b/lib/handle.c index 2af25fe..5ad818e 100644 --- a/lib/handle.c +++ b/lib/handle.c @@ -315,6 +315,8 @@