Re: Unsightly errors due to race on closing stdin when handling signals in s6-log

From: Laurent Bercot <ska-skaware_at_skarnet.org>
Date: Thu, 23 Dec 2021 19:32:20 +0000

>IIRC the use case involves signal handling, which causes prepare_to_exit() to be called in handle_signals(). Once the signal handler returns, stdin is closed. The mainline continues to refer to the now closed file descriptor, and emits errors as consequence. The process terminates, but the path to exit is unsightly.

  Ah, good catch. Thanks for the report and the patch!
  I don't like opening anything (even /dev/null) on an exit path, so
I'll try to fix the problem in another way (tracking use of fd 0 in
the mainline) over the next few days. If it proves too difficult, I'll
commit something similar to your patch.

--
  Laurent
Received on Thu Dec 23 2021 - 20:32:20 CET

This archive was generated by hypermail 2.4.0 : Thu Dec 23 2021 - 20:32:51 CET