search for: 111cfc5

Displaying 3 results from an estimated 3 matches for "111cfc5".

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.
...=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->pid, SIGH...
2019 Jul 25
1
Re: [PATCH libnbd] lib: Kill subprocess in nbd_close.
...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() issued _...