1nbd_kill_subprocess(3)              LIBNBD              nbd_kill_subprocess(3)
2
3
4

NAME

6       nbd_kill_subprocess - kill server running as a subprocess
7

SYNOPSIS

9        #include <libnbd.h>
10
11        int nbd_kill_subprocess (
12              struct nbd_handle *h, int signum
13            );
14

DESCRIPTION

16       This call may be used to kill the server running as a subprocess that
17       was previously created using nbd_connect_command(3).  You do not need
18       to use this call.  It is only needed if the server does not exit when
19       the socket is closed.
20
21       The "signum" parameter is the optional signal number to send (see
22       signal(7)).  If "signum" is 0 then "SIGTERM" is sent.
23

RETURN VALUE

25       If the call is successful the function returns 0.
26

ERRORS

28       On error -1 is returned.
29
30       Refer to "ERROR HANDLING" in libnbd(3) for how to get further details
31       of the error.
32
33       The following parameters must not be NULL: "h".  For more information
34       see "Non-NULL parameters" in libnbd(3).
35

VERSION

37       This function first appeared in libnbd 1.0.
38
39       If you need to test if this function is available at compile time check
40       if the following macro is defined:
41
42        #define LIBNBD_HAVE_NBD_KILL_SUBPROCESS 1
43

SEE ALSO

45       nbd_connect_command(3), nbd_create(3), libnbd(3), signal(7).
46

AUTHORS

48       Eric Blake
49
50       Richard W.M. Jones
51
53       Copyright Red Hat
54

LICENSE

56       This library is free software; you can redistribute it and/or modify it
57       under the terms of the GNU Lesser General Public License as published
58       by the Free Software Foundation; either version 2 of the License, or
59       (at your option) any later version.
60
61       This library is distributed in the hope that it will be useful, but
62       WITHOUT ANY WARRANTY; without even the implied warranty of
63       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
64       Lesser General Public License for more details.
65
66       You should have received a copy of the GNU Lesser General Public
67       License along with this library; if not, write to the Free Software
68       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
69       02110-1301 USA
70
71
72
73libnbd-1.16.5                     2023-09-26            nbd_kill_subprocess(3)
Impressum