The problem is that until a new-line is received, s6-log will not respond to SIGHUP and SIGTERM. I assume this is not as expected.
This is expected; the goal is to finish reading partial lines before existing. This is useful with services that are writing a large amount of logs, where the buffer length does not necessarily align with a newline: after receiving the signal, the logger reads until the next newline, processes the line, then exits. No service should ever write a partial line at the end of their lifetime. However, I agree that the situation you're describing is not ideal and s6-log should be more robust. I'm thinking of adding a timeout: if s6-log hasn't received the end of a partial line n milliseconds after receiving a terminating signal, then it should process the partial line anyway and exit. What do you think? -- Laurent
