Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Discard STDOUT and STDERR in p2-logbridge #1088

Merged
merged 1 commit into from
Sep 25, 2018

Conversation

spenceral
Copy link
Collaborator

Environments that use systemd-journald may be affected by a bug in which
logbridge write()s will fail with EPIPE if systemd-journald restarts. To
avoid this, we can update the STDOUT and STDERR file descriptors to
point at /dev/null.

Context

@@ -27,6 +27,11 @@ func main() {
os.Exit(1)
}

if err := discardSTDOUTAndSTDERR(); err != nil {
logging.DefaultLogger.WithError(err).Error("fatal error discarding STDOUT and STDIN")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

STDOUT and STDERR

Environments that use systemd-journald may be affected by a bug in which
logbridge write()s will fail with EPIPE if systemd-journald restarts. To
avoid this, we can update the STDOUT and STDERR file descriptors to
point at /dev/null.
@spenceral spenceral merged commit f4339b5 into square:master Sep 25, 2018
@spenceral spenceral deleted the logbridge-devnull branch September 25, 2018 23:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants