mirror of
https://github.com/systemd/systemd.git
synced 2024-11-23 18:23:32 +08:00
systemd-python: fix segfault on double close
This commit is contained in:
parent
516424a411
commit
db7f1dde30
2
TODO
2
TODO
@ -570,6 +570,8 @@ Features:
|
|||||||
- allow reading of only select fields in systemd.journal._reader.Reader
|
- allow reading of only select fields in systemd.journal._reader.Reader
|
||||||
- export sd_journal_test_cursor in systemd.journal._reader.Reader
|
- export sd_journal_test_cursor in systemd.journal._reader.Reader
|
||||||
- export sd_journal_get_usage in systemd.journal._reader.Reader
|
- export sd_journal_get_usage in systemd.journal._reader.Reader
|
||||||
|
- add systemd.journal._reader._Reader.closed attribute (it can
|
||||||
|
be just "return self->j != NULL")
|
||||||
- figure out a simple way to wait for journal events in a way that
|
- figure out a simple way to wait for journal events in a way that
|
||||||
works with ^C
|
works with ^C
|
||||||
|
|
||||||
|
@ -171,6 +171,7 @@ PyDoc_STRVAR(Reader_close__doc__,
|
|||||||
static PyObject* Reader_close(Reader *self, PyObject *args)
|
static PyObject* Reader_close(Reader *self, PyObject *args)
|
||||||
{
|
{
|
||||||
sd_journal_close(self->j);
|
sd_journal_close(self->j);
|
||||||
|
self->j = NULL;
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user