Displaying 6 results from an estimated 6 matches for "2af25fe".
2019 Sep 26
0
Re: [PATCH libnbd 1/2] lib: Avoid killing subprocess twice.
...cess, 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 @@ nbd_unlocked_kill_subprocess (struct nbd_handle *h, int signum)
> return -1;
> }
>
> + h->pid = -1;
> +
Ouch - this means we completely forget about the child process, even if...
2019 Sep 17
1
[libnbd PATCH] api: Add nbd_get_structured_replies_negotiated
...1, 2);
"get_request_structured_replies", (1, 2);
+ "get_structured_replies_negotiated", (1, 2);
"get_tls_negotiated", (1, 2);
"get_protocol", (1, 2);
"set_handshake_flags", (1, 2);
diff --git a/lib/handle.c b/lib/handle.c
index 36e6434..2af25fe 100644
--- a/lib/handle.c
+++ b/lib/handle.c
@@ -260,6 +260,12 @@ nbd_unlocked_get_request_structured_replies (struct nbd_handle *h)
return h->request_sr;
}
+int
+nbd_unlocked_get_structured_replies_negotiated (struct nbd_handle *h)
+{
+ return h->structured_replies;
+}
+
int
nbd_unlo...
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 @@ nbd_unlocked_kill_subprocess (struct nbd_handle *h, int signum)
return -1;
}
+ h->pid = -1;
+
return 0;
}
--
2.23.0
2019 Sep 30
4
[PATCH libnbd v2 0/2] Implement systemd socket activation.
v1 was posted here:
https://www.redhat.com/archives/libguestfs/2019-September/thread.html#00337
v2:
- Drop the first patch.
- Hopefully fix the multiple issues with fork-safety and general
behaviour on error paths.
Note this requires execvpe for which there seems to be no equivalent
on FreeBSD, except some kind of tedious path parsing (but can we
assign to environ?)
Rich.
2019 Oct 01
2
Re: [PATCH libnbd v2 2/2] api: Implement local command with systemd socket activation.
...urn -1;
> + }
> +
> + if (h->argv)
> + nbd_internal_free_string_list (h->argv);
How can h->argv ever be previously set?
> + h->argv = copy;
> +
> + return nbd_internal_run (h, cmd_connect_sa);
> +}
> diff --git a/lib/handle.c b/lib/handle.c
> index 2af25fe..a7f2c79 100644
> --- a/lib/handle.c
> +++ b/lib/handle.c
> @@ -129,6 +129,16 @@ nbd_close (struct nbd_handle *h)
> free_cmd_list (h->cmds_in_flight);
> free_cmd_list (h->cmds_done);
> nbd_internal_free_string_list (h->argv);
> + if (h->sa_sockpath) {
&...
2019 Sep 30
0
[PATCH libnbd v2 2/2] api: Implement local command with systemd socket activation.
...ing_list (argv);
+ if (!copy) {
+ set_error (errno, "copy_string_list");
+ return -1;
+ }
+
+ if (h->argv)
+ nbd_internal_free_string_list (h->argv);
+ h->argv = copy;
+
+ return nbd_internal_run (h, cmd_connect_sa);
+}
diff --git a/lib/handle.c b/lib/handle.c
index 2af25fe..a7f2c79 100644
--- a/lib/handle.c
+++ b/lib/handle.c
@@ -129,6 +129,16 @@ nbd_close (struct nbd_handle *h)
free_cmd_list (h->cmds_in_flight);
free_cmd_list (h->cmds_done);
nbd_internal_free_string_list (h->argv);
+ if (h->sa_sockpath) {
+ if (h->pid > 0)
+ kill...