Reasoning:
- kill has delivered signal
- child is waiting on input
- child gets input appends it to file and exits the while-loop
- another signal comes
- another log-line is injected
- the process is not dead yet but is out of the while loop
- it wont read the input and will never flush it to file because it never read it
- it dies, new process is started, it gets next message, but the previous message is now lost
It can lead to multiple messages being lost too.
The fix is to reduce the number of messages we pass through this read-log, write-log and kill-process cycle so we can afford some sleep and then actually adding some sleep.
- now omprog kills the program by issuing TERM signal, but it can wait indefinitely when TERM is ignored (will fix this in a separate commit)
- omkafka was complaining of deprecated-fn-use in 0.9.x versions of librdkafka, which is now fixed
- fixed an incorrect comment in imdiag