Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer (GitLab) <jacob@gitlab.com>2017-12-15 18:16:23 +0300
committerAhmad Sherif <ahmad.m.sherif@gmail.com>2017-12-15 18:16:23 +0300
commit832f32e14702fa513fdb0b8b25785287d034f85c (patch)
tree9bd26fbcd300f1360a47458869962cc09a595275 /internal/supervisor
parentfd572dbc74f7386da09848f4bb393905d75d49f7 (diff)
Eagerly close logrus writer pipes
Diffstat (limited to 'internal/supervisor')
-rw-r--r--internal/supervisor/supervisor.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/supervisor/supervisor.go b/internal/supervisor/supervisor.go
index eba248549..2df305cc1 100644
--- a/internal/supervisor/supervisor.go
+++ b/internal/supervisor/supervisor.go
@@ -2,6 +2,7 @@ package supervisor
import (
"fmt"
+ "io"
"os/exec"
"sync"
"time"
@@ -141,6 +142,9 @@ spawnLoop:
go func(cmd *exec.Cmd, waitCh chan struct{}) {
err := cmd.Wait()
close(waitCh)
+
+ cmd.Stdout.(io.WriteCloser).Close()
+ cmd.Stderr.(io.WriteCloser).Close()
logger.WithError(err).Warn("exited")
}(cmd, waitCh)