search for: 1fe4467

Displaying 4 results from an estimated 4 matches for "1fe4467".

Did you mean: 14467
2019 Jul 25
2
[PATCH libnbd] lib: Kill subprocess in nbd_close.
This is a simple patch which stops nbd_close from waiting too long for a server subprocess to shut down. I wanted to send SIGHUP because the server will be able to catch it and do a clean shutdown if that is required. Is another signal better? Is it right to send a signal here? Rich.
2019 Jul 25
0
[PATCH libnbd] lib: Kill subprocess in nbd_close.
...elay-read=10"]); b = nbd.aio_buffer(1); h.aio_pread (b, 0); del (h)' real 0m10.499s user 0m0.065s sys 0m0.023s With this patch the elapsed time is near instantaneous. --- lib/handle.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/handle.c b/lib/handle.c index 1fe4467..111cfc5 100644 --- a/lib/handle.c +++ b/lib/handle.c @@ -124,8 +124,10 @@ nbd_close (struct nbd_handle *h) freeaddrinfo (h->result); if (h->sock) h->sock->ops->close (h->sock); - if (h->pid >= 0) /* XXX kill it? */ + if (h->pid >= 0) { + kill (h->...
2019 Jul 25
1
Re: [PATCH libnbd] lib: Kill subprocess in nbd_close.
...d (b, 0); del (h)' > real 0m10.499s > user 0m0.065s > sys 0m0.023s > > With this patch the elapsed time is near instantaneous. > --- > lib/handle.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/lib/handle.c b/lib/handle.c > index 1fe4467..111cfc5 100644 > --- a/lib/handle.c > +++ b/lib/handle.c > @@ -124,8 +124,10 @@ nbd_close (struct nbd_handle *h) > freeaddrinfo (h->result); > if (h->sock) > h->sock->ops->close (h->sock); Note that this patch is trying to speed up a slow waitpid()...
2019 Jul 25
4
[PATCH libnbd] api: New nbd_kill_command API for sending a signal to the command subprocess.
...ptional signal number to send +(see L<signal(7)>). If signal is C<0> then C<SIGTERM> is sent."; + }; + "supports_tls", { default_call with args = []; ret = RBool; is_locked = false; may_set_error = false; diff --git a/lib/handle.c b/lib/handle.c index 1fe4467..ccfea42 100644 --- a/lib/handle.c +++ b/lib/handle.c @@ -22,6 +22,8 @@ #include <stdlib.h> #include <unistd.h> #include <errno.h> +#include <signal.h> +#include <assert.h> #include <netdb.h> #include <sys/types.h> #include <sys/wait.h> @@ -124,...