search for: nbd_unlocked_kill_subprocess

Displaying 3 results from an estimated 3 matches for "nbd_unlocked_kill_subprocess".

2019 Sep 26
0
Re: [PATCH libnbd 1/2] lib: Avoid killing subprocess twice.
...s 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 signum == SIGHUP and was meant merely to get the server to reload state rather than to kill it (we've talked abou...
2019 Aug 15
1
[PATCH libnbd] api: Rename nbd_kill_command -> nbd_kill_subprocess.
..."kill server running as a subprocess"; diff --git a/lib/handle.c b/lib/handle.c index d599eef..b508744 100644 --- a/lib/handle.c +++ b/lib/handle.c @@ -254,7 +254,7 @@ nbd_unlocked_get_version (struct nbd_handle *h) } int -nbd_unlocked_kill_command (struct nbd_handle *h, int signum) +nbd_unlocked_kill_subprocess (struct nbd_handle *h, int signum) { if (h->pid == -1) { set_error (ESRCH, "no subprocess exists"); diff --git a/tests/closure-lifetimes.c b/tests/closure-lifetimes.c index 5a7cd9c..70788b6 100644 --- a/tests/closure-lifetimes.c +++ b/tests/closure-lifetimes.c @@ -143,7 +143,7...
2019 Sep 26
5
[PATCH libnbd 1/2] lib: Avoid killing subprocess twice.
...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