sd-journal: make sure it's safe to call sd_journal_process() before the first sd_jour...
authorLennart Poettering <lennart@poettering.net>
Fri, 9 Feb 2018 21:38:46 +0000 (22:38 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 12 Feb 2018 10:27:12 +0000 (11:27 +0100)
commit10c4d6405f74258ea4fac5db4888c1bf49ad5399
tree5ea4d8452747b7bba51ffb5d1895d2654f336962
parent47c073aa82ba111f432370a3fa709bbab9998fd9
sd-journal: make sure it's safe to call sd_journal_process() before the first sd_journal_wait()

In that case we have no inotify fd yet, and there's nothing to process
hence. Let's make the call a NOP.

(Previously, without this change we'd end up trying to read off inotify
fd -1, which is quite a problem... ðŸ˜¢)
src/journal/sd-journal.c