netns: Add a close() method to VCmd objects.
This commit is contained in:
parent
b1de00be1a
commit
5a58978f79
1 changed files with 15 additions and 0 deletions
|
@ -845,6 +845,18 @@ static PyObject *VCmd_kill(VCmd *self, PyObject *args, PyObject *kwds)
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *VCmd_close(VCmd *self, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
if (self->_client)
|
||||||
|
{
|
||||||
|
vcmd_delclientreq_t delclreq = {.vcmd = self};
|
||||||
|
|
||||||
|
call_asyncfunc(async_delclientreq, &delclreq);
|
||||||
|
}
|
||||||
|
|
||||||
|
Py_RETURN_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
static PyMemberDef VCmd_members[] = {
|
static PyMemberDef VCmd_members[] = {
|
||||||
{NULL, 0, 0, 0, NULL},
|
{NULL, 0, 0, 0, NULL},
|
||||||
};
|
};
|
||||||
|
@ -883,6 +895,9 @@ static PyMethodDef VCmd_methods[] = {
|
||||||
"cmdwait: the VCmdWait object from an earlier command request\n"
|
"cmdwait: the VCmdWait object from an earlier command request\n"
|
||||||
"signum: the signal to send"},
|
"signum: the signal to send"},
|
||||||
|
|
||||||
|
{"close", (PyCFunction)VCmd_close, METH_NOARGS,
|
||||||
|
"close() -> None"},
|
||||||
|
|
||||||
{NULL, NULL, 0, NULL},
|
{NULL, NULL, 0, NULL},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue