-
Notifications
You must be signed in to change notification settings - Fork 14
When journald restarts, program should exit abnormally. #15
Comments
@yutannihilation @nojima |
I just noticed that systemd has an option IgnoreSIGPIPE, and it is true by default.
Therefore, it is possible that SIGPIPE is still ignored although we explicitly handle SIGPIPE to exit abnormally. However, the existence of this option contradicts our experience ― our daemons under systemd were killed by SIGPIPE. I suppose that this option does not work in some condition. |
@nojima |
The above description is wrong. Go does not override the SIGPIPE handler. |
In #13, we just ignored SIGPIPE upon journald restarts.
As a consequence, programs using this framework will not fail
on journald restart but now they may stack when writing logs to
stdout/stderr pipes.
I don't know the exact reason but as systemd & journald is so flaky,
and SIGPIPE is treated as normal exit condition by systemd, we need
to catch SIGPIPE on stdout/stderr and exit abnormally, say, with
exit condition 2.
The text was updated successfully, but these errors were encountered: