Re: s6-log not responding to signals

From: Laurent Bercot <ska-skaware_at_skarnet.org>
Date: Thu, 25 May 2023 14:20:26 +0000

>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
Received on Thu May 25 2023 - 16:20:26 CEST

This archive was generated by hypermail 2.4.0 : Thu May 25 2023 - 16:20:57 CEST