This repository has been archived by the owner on Mar 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
SIGPIPE from journald prevents restart #13
Labels
Comments
systemd.exec specifies |
Note that |
@yutannihilation @nojima
|
@nojima and I agreed that we should just ignore SIGPIPE and make it a specification of the framework. |
ymmt2005
added a commit
that referenced
this issue
Mar 1, 2017
ymmt2005
added a commit
that referenced
this issue
Mar 1, 2017
ymmt2005
added a commit
that referenced
this issue
Mar 1, 2017
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Go does not ignore SIGPIPE for fd 1 & 2 (stdout & stderr).
This can be a problem when programs written in Go run under systemd.
Quote from https://golang.org/pkg/os/signal/
A typical systemd service configuration looks like:
Services configured like this have its stdout and stderr connected with systemd-journald.
Journald is infamous for raising SIGPIPE when it restarts. If this happens, Go programs that do not install SIGPIPE handlers will die because of the aforementioned specification.
Worse, systemd does not restart the service when it dies for SIGPIPE despite
Restart=on-failure
.This is because the default value of
SuccessExitStatus
includes SIGPIPE and therefore systemd considers that the program exited normally.The text was updated successfully, but these errors were encountered: