search for: nbd_kill_command

Displaying 19 results from an estimated 19 matches for "nbd_kill_command".

2019 Aug 15
1
[PATCH libnbd] api: Rename nbd_kill_command -> nbd_kill_subprocess.
...or index 13cb0b9..6cc06cc 100755 --- a/generator/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_c...
2019 Aug 15
2
Re: [PATCH libnbd v2 10/10] generator: Check requirements for BytesPersistIn/Out and completion callbacks.
...d it must have an OClosure completion optarg. > + *) I like it. Other than the unintended semantic change in patch 4, I think this series is ready to go. We still had another potential API change to squeeze into 0.9.8: Right now, the API is overloading 'command': nbd_connect_command/nbd_kill_command vs. nbd_aio_command_completed/nbd_aio_peek_command_completed Keeping nbd_connect_command may be okay (it takes a command line to 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 abor...
2019 Jul 25
0
Re: [PATCH libnbd] api: New nbd_kill_command API for sending a signal to the command subprocess.
...of naming? I'd use signum, if we're worried. > @@ -149,6 +150,7 @@ main (int argc, char *argv[]) > read_cb, NULL, > completion_cb, NULL, 0); > if (cookie == -1) NBD_ERROR; > + nbd_kill_command (nbd, 0); This looks a bit funny until I read the docs at [1]. When using kill(2), I'm used to the function call 'kill(pid, 0)' probing for process existence. But on the command line, kill(1) has the behavior of sending SIGTERM by default when you omit a signal number (and not servin...
2019 Jul 25
4
[PATCH libnbd] api: New nbd_kill_command API for sending a signal to the command subprocess.
...made."; longdesc = "\ 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>."; +behave like inetd clients, such as C<nbdkit --single>. + +See also C<nbd_kill_command>."; }; "read_only", { @@ -2244,6 +2246,20 @@ The release number is incremented for each release along a particular branch."; }; + "kill_command", { + default_call with + args = [ Int "signal" ]; ret = RErr; + shortdesc = "kill...
2019 Jul 25
0
Re: [PATCH libnbd] api: New nbd_kill_command API for sending a signal to the command subprocess.
On 7/25/19 4:11 PM, Richard W.M. Jones wrote: > On Thu, Jul 25, 2019 at 03:19:23PM -0500, Eric Blake wrote: >> This looks a bit funny until I read the docs at [1]. When using >> kill(2), I'm used to the function call 'kill(pid, 0)' probing for >> process existence. But on the command line, kill(1) has the behavior of >> sending SIGTERM by default when you
2019 Jul 25
2
Re: [PATCH libnbd] api: New nbd_kill_command API for sending a signal to the command subprocess.
On Thu, Jul 25, 2019 at 03:19:23PM -0500, Eric Blake wrote: > This looks a bit funny until I read the docs at [1]. When using > kill(2), I'm used to the function call 'kill(pid, 0)' probing for > process existence. But on the command line, kill(1) has the behavior of > sending SIGTERM by default when you omit a signal number (and not > serving as a process existence
2019 Aug 15
0
Re: [PATCH libnbd v2 10/10] generator: Check requirements for BytesPersistIn/Out and completion callbacks.
On Thu, Aug 15, 2019 at 07:01:49AM -0500, Eric Blake wrote: > We still had another potential API change to squeeze into 0.9.8: > Right now, the API is overloading 'command': > nbd_connect_command/nbd_kill_command > vs. > nbd_aio_command_completed/nbd_aio_peek_command_completed > > Keeping nbd_connect_command may be okay (it takes a command line to > 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...
2019 Aug 14
3
[libnbd PATCH 0/2] Drop generated file from git
Rich recently patched things to generate one man page per function rather than libnbd-api.3 (nice), but in doing so got stumped by a problem with a fresh git clone (automake fails for any 'include' directive that does not already exist). I've figured out how to hack around it, but the hack requires GNU make. We already use GNU make constructs elsewhere (such as $(wildcard)), but
2019 Aug 06
5
[PATCH libnbd 0/3] One API and small documentation changes.
One API change, some small documentation changes.
2019 Aug 14
0
[libnbd PATCH 2/2] docs: Drop docs/Makefile.inc from 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_command \ - nbd_supports_tls \ - nbd_supports_uri \ - $(NULL) diff --git a/generator/generator b/generator/generator index 257303f..9fe98f5 100755 --- a/generator/generator +++ b/generator/generator @@ -3733,9 +3733,10 @@ let generate_lib_api_c () = pr "\n"; List.iter print_wrapper handle_c...
2019 Aug 06
0
[PATCH libnbd 1/3] api: Change nbd_read_only -> nbd_is_read_only.
...t is read-only\n", argv[0]); exit (EXIT_FAILURE); } diff --git a/generator/generator b/generator/generator index 7328438..132d6cb 100755 --- a/generator/generator +++ b/generator/generator @@ -1231,7 +1231,7 @@ behave like inetd clients, such as C<nbdkit --single>. See also C<nbd_kill_command>."; }; - "read_only", { + "is_read_only", { default_call with args = []; ret = RBool; permitted_states = [ Connected; Closed ]; diff --git a/lib/flags.c b/lib/flags.c index cdbc28f..2bcacb8 100644 --- a/lib/flags.c +++ b/lib/flags.c @@ -65,7 +65,7 @...
2019 Aug 12
0
[PATCH libnbd 7/7] api: Remove the valid_flag from all callbacks.
..._ERROR; } - assert (read_cb_valid == 1); - assert (completion_cb_valid == 1); - assert (read_cb_free == 1); - assert (completion_cb_free == 1); + assert (read_cb_called == 1); + assert (completion_cb_called == 1); + assert (read_cb_freed == 1); + assert (completion_cb_freed == 1); nbd_kill_command (nbd, 0); nbd_close (nbd); @@ -137,21 +155,26 @@ main (int argc, char *argv[]) /* Test command callbacks are freed if the handle is closed without * running the commands. */ - read_cb_valid = read_cb_free = - completion_cb_valid = completion_cb_free = 0; + read_cb_called = read_c...
2019 Aug 13
0
[PATCH libnbd 2/4] api: Add free function and remove valid_flag parameter.
..._ERROR; } - assert (read_cb_valid == 1); - assert (completion_cb_valid == 1); - assert (read_cb_free == 1); - assert (completion_cb_free == 1); + assert (read_cb_called == 1); + assert (completion_cb_called == 1); + assert (read_cb_freed == 1); + assert (completion_cb_freed == 1); nbd_kill_command (nbd, 0); nbd_close (nbd); @@ -138,22 +151,24 @@ main (int argc, char *argv[]) /* Test command callbacks are freed if the handle is closed without * running the commands. */ - read_cb_valid = read_cb_free = - completion_cb_valid = completion_cb_free = 0; + read_cb_called = read_c...
2019 Aug 15
13
[PATCH libnbd v2 00/10] Callbacks and OCaml and Python persistent buffers.
This is a combination of these two earlier series: https://www.redhat.com/archives/libguestfs/2019-August/msg00235.html https://www.redhat.com/archives/libguestfs/2019-August/msg00240.html plus changes to allow .callback = NULL / .free != NULL, and to reduce the complexity of freeing callbacks. Although it's rather long there's nothing complex here. We might consider squashing some
2019 Aug 13
8
[PATCH libnbd 0/4] Add free function to callbacks.
Patches 1 & 2 are rather complex, but the end result is that we pass closures + user_data + free function in single struct parameters as I described previously in this email: https://www.redhat.com/archives/libguestfs/2019-August/msg00210.html Patch 3 adds a convenient FREE_CALLBACK macro which seems a worthwhile simplification if you buy into 1 & 2. Patch 4 adds another macro which is
2019 Aug 13
0
[PATCH libnbd] api: Rename nbd_aio_*_callback to nbd_aio_*.
...ead_cb, NULL, - completion_cb, NULL, 0); + cookie = nbd_aio_pread_structured (nbd, buf, sizeof buf, 0, + read_cb, NULL, + completion_cb, NULL, 0); if (cookie == -1) NBD_ERROR; nbd_kill_command (nbd, 0); nbd_close (nbd); diff --git a/tests/errors.c b/tests/errors.c index 8a916fe..e442738 100644 --- a/tests/errors.c +++ b/tests/errors.c @@ -222,7 +222,7 @@ main (int argc, char *argv[]) exit (EXIT_FAILURE); } check (ERANGE, "nbd_pread: "); - if (nbd_aio_pwrite (nbd,...
2019 Aug 12
14
[PATCH libnbd 0/7] Add free callbacks and remove valid_flag.
As proposed here: https://www.redhat.com/archives/libguestfs/2019-August/msg00130.html I didn't actually read Eric's replies to that yet because I've been concentrating on writing these patches all day. Anyway here they are and I'll look at what Eric said about the proposal next. Rich.
2019 Aug 13
2
[PATCH libnbd] api: Rename nbd_aio_*_callback to nbd_aio_*.
This applies on top of the OClosure v2 series posted a few minutes ago. Rich.
2019 Aug 13
0
[PATCH libnbd 1/4] api: Combine callback and user_data into a single struct.
...completion_cb, NULL, 0); + (nbd_chunk_callback) { .callback = read_cb }, + (nbd_completion_callback) { .callback = completion_cb }, + 0); if (cookie == -1) NBD_ERROR; nbd_kill_command (nbd, 0); nbd_close (nbd); diff --git a/tests/errors.c b/tests/errors.c index e442738..21ec919 100644 --- a/tests/errors.c +++ b/tests/errors.c @@ -222,7 +222,8 @@ main (int argc, char *argv[]) exit (EXIT_FAILURE); } check (ERANGE, "nbd_pread: "); - if (nbd_aio_pwrite (nbd,...