5451d79b296bbeada4d38d062044b6e985e54708
1. The journald client library initializes inotify watch(es) during the first call to sd_journal_get_fd(), and it make sense to open it earlier in order to not lose any journal file rotation events. 2. It only makes sense to call this if we're going to use it later on -- so add a check for config.Follow. 3. Remove the redundant call to sd_journal_get_fd(). NOTE that any subsequent calls to sd_journal_get_fd() return the same file descriptor, so there's no real need to save it for later use in wait_for_data_cancelable(). Based on earlier patch by Nalin Dahyabhai <nalin@redhat.com>. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> (cherry picked from commit 981c01665bcb2c9fc5e555c5b976995f31c2a6b4) Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> Upstream-commit: 349e199eab5337f03b442f38720293143e1b1fca Component: engine
Description
No description provided
Languages
Go
92%
Shell
5.5%
Dockerfile
1.1%
Go-Checksums
0.9%
Makefile
0.3%
Other
0.2%