search for: nbd_kill_subprocess

Displaying 14 results from an estimated 14 matches for "nbd_kill_subprocess".

2019 Aug 15
1
[PATCH libnbd] api: Rename nbd_kill_command -> nbd_kill_subprocess.
...r/generator +++ b/generator/generator @@ -1315,7 +1315,7 @@ Run the command as a subprocess and connect to it over stdin/stdout. This is for use with NBD servers which can behave like inetd clients, such as C<nbdkit --single>. -See also L<nbd_kill_command(3)>."; +See also L<nbd_kill_subprocess(3)>."; }; "is_read_only", { @@ -2249,7 +2249,7 @@ The release number is incremented for each release along a particular branch."; }; - "kill_command", { + "kill_subprocess", { default_call with args = [ Int "signum" ]; r...
2020 Sep 11
3
[libnbd PATCH] api: Add LIBNBD_SHUTDOWN_IMMEDIATE flag
...g, so that our first request will + * exceed the buffer and force the second request to be stuck client + * side (without stopping the server, we would be racing on whether + * we hit a block on writes based on whether the server can read + * faster than we can fill the pipe). + */ + if (nbd_kill_subprocess (nbd, SIGSTOP) == -1) { + fprintf (stderr, "%s: test failed: nbd_kill_subprocess: %s\n", argv[0], + nbd_get_error ()); + exit (EXIT_FAILURE); + } + + /* Issue back-to-back write requests, both large enough to block. Set up + * the second to auto-retire via callback....
2020 Sep 17
0
Re: [libnbd PATCH] api: Add LIBNBD_SHUTDOWN_IMMEDIATE flag
...ill > + * exceed the buffer and force the second request to be stuck client > + * side (without stopping the server, we would be racing on whether > + * we hit a block on writes based on whether the server can read > + * faster than we can fill the pipe). > + */ > + if (nbd_kill_subprocess (nbd, SIGSTOP) == -1) { > + fprintf (stderr, "%s: test failed: nbd_kill_subprocess: %s\n", argv[0], > + nbd_get_error ()); > + exit (EXIT_FAILURE); > + } > + > + /* Issue back-to-back write requests, both large enough to block. Set up > + * the...
2019 Aug 15
2
Re: [PATCH libnbd v2 10/10] generator: Check requirements for BytesPersistIn/Out and completion callbacks.
On 8/15/19 4:56 AM, Richard W.M. Jones wrote: > --- > generator/generator | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > > diff --git a/generator/generator b/generator/generator > index 1252bdb..13cb0b9 100755 > --- a/generator/generator > +++ b/generator/generator > @@ -3121,6 +3121,31 @@ let () = > failwithf "%s: first_version
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 +++...
2019 Aug 15
0
Re: [PATCH libnbd v2 10/10] generator: Check requirements for BytesPersistIn/Out and completion callbacks.
...> create a subprocess), but we may want to rename nbd_kill_command to > nbd_kill_child or similar, to make it obvious that it is NOT associated > with attempting an early abort of any synchronous nbd_pread or other > commands issued to the server. Shall we rename nbd_kill_command -> nbd_kill_subprocess? (kill_child sounds a bit weird.) As for the other API changes added to TODO, I think we can deal with them by adding variants at a later date. For example we wanted some "allow" flags for nbd_connect_uri, but didn't really come to a conclusion about how to do that right now. Howev...
2019 Sep 26
0
Re: [PATCH libnbd 1/2] lib: Avoid killing subprocess twice.
On 9/26/19 11:40 AM, Richard W.M. Jones wrote: > 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 2af2...
2019 Aug 15
1
[PATCH libnbd] docs: Change docs/Makefile.inc back to a regular include, readd to git.
...\ + nbd_aio_is_created \ + nbd_aio_is_connecting \ + nbd_aio_is_ready \ + nbd_aio_is_processing \ + nbd_aio_is_dead \ + nbd_aio_is_closed \ + nbd_aio_command_completed \ + nbd_aio_peek_command_completed \ + nbd_aio_in_flight \ + nbd_connection_state \ + nbd_get_package_name \ + nbd_get_version \ + nbd_kill_subprocess \ + nbd_supports_tls \ + nbd_supports_uri \ + $(NULL) diff --git a/generator/generator b/generator/generator index 6cc06cc..437f432 100755 --- a/generator/generator +++ b/generator/generator @@ -3766,7 +3766,7 @@ let generate_lib_api_c () = let generate_docs_Makefile_inc () = generate_header Ha...
2020 Sep 07
0
[libnbd PATCH 2/2] generator: Free closures on failure
....free = completion_cb_free }, + 0); + if (cookie != -1) { + fprintf (stderr, "%s: Expecting block_status failure\n", argv[0]); + exit (EXIT_FAILURE); + } + assert (block_status_cb_freed == 1); + assert (completion_cb_freed == 1); + + nbd_kill_subprocess (nbd, 0); + nbd_close (nbd); + exit (EXIT_SUCCESS); } diff --git a/tests/newstyle-limited.c b/tests/newstyle-limited.c index fd89620..4479a14 100644 --- a/tests/newstyle-limited.c +++ b/tests/newstyle-limited.c @@ -84,6 +84,17 @@ list_cb (void *opaque, const char *name, const char *description...
2019 Sep 26
0
[PATCH libnbd 2/2] api: Implement local command with systemd socket activation.
...tdesc = "connect using systemd socket activation"; + longdesc = "\ +Run the command as a subprocess and connect to it using +systemd socket activation. This is for use with NBD servers +such as C<nbdkit> which understand socket activation."; + see_also = ["L<nbd_kill_subprocess(3)>"]; + }; + "is_read_only", { default_call with args = []; ret = RBool; @@ -2093,6 +2118,22 @@ Run the command as a subprocess and begin connecting to it over stdin/stdout. Parameters behave as documented in L<nbd_connect_command(3)>. +You can check if t...
2023 Jul 13
2
[libnbd PATCH 0/2] Fix docs and testing of completion callback
This is my proposal for fixing the documentation to match practice (namely, that completion.callback is not invoked in the cases where the aio call itself reports errors); we could instead try to go the other direction and tweak the generator to guarantee that both completion.callback and completion.free are reached no matter what, but that felt more invasive to me. Eric Blake (2): api: Tighten
2019 Sep 30
0
[PATCH libnbd v2 2/2] api: Implement local command with systemd socket activation.
...tdesc = "connect using systemd socket activation"; + longdesc = "\ +Run the command as a subprocess and connect to it using +systemd socket activation. This is for use with NBD servers +such as C<nbdkit> which understand socket activation."; + see_also = ["L<nbd_kill_subprocess(3)>"]; + }; + "is_read_only", { default_call with args = []; ret = RBool; @@ -2093,6 +2118,22 @@ Run the command as a subprocess and begin connecting to it over stdin/stdout. Parameters behave as documented in L<nbd_connect_command(3)>. +You can check if t...
2020 Sep 07
4
[libnbd PATCH 0/2] Fix memory leak with closures
As promised in my earlier thread on libnbd completion callback question. Eric Blake (2): generator: Refactor handling of closures in unlocked functions generator: Free closures on failure docs/libnbd.pod | 2 +- generator/C.ml | 48 +++++++++++------ generator/C.mli | 1 + lib/debug.c | 7 +-- lib/opt.c | 31 ++++++-----
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.