1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-07 01:27:11 +03:00

journald: make sure the stdout/stderr stream fd is removed from epoll before we close it

This commit is contained in:
Lennart Poettering 2013-12-11 23:36:59 +01:00
parent b3de50cb07
commit 21c6dc33a6

View File

@ -334,8 +334,10 @@ void stdout_stream_free(StdoutStream *s) {
LIST_REMOVE(stdout_stream, s->server->stdout_streams, s);
}
if (s->event_source)
if (s->event_source) {
sd_event_source_set_enabled(s->event_source, SD_EVENT_OFF);
s->event_source = sd_event_source_unref(s->event_source);
}
if (s->fd >= 0)
close_nointr_nofail(s->fd);