From: Sergey Matveev Date: Sat, 7 Oct 2023 17:30:30 +0000 (+0300) Subject: Serialise stderr writing X-Git-Tag: v2.0.0~7 X-Git-Url: http://www.git.cypherpunks.ru/?p=goredo.git;a=commitdiff_plain;h=ef0feea55f4544f8b76992eca6311e348f0add65 Serialise stderr writing --- diff --git a/run.go b/run.go index 283ebc9..037e7bd 100644 --- a/run.go +++ b/run.go @@ -628,7 +628,9 @@ func runScript(tgt *Tgt, errs chan error, forced, traced bool) error { line = scanner.Text() if strings.HasPrefix(line, childStderrPrefix) { line = line[len(childStderrPrefix):] + LogMutex.Lock() os.Stderr.WriteString(StderrPrefix + line + "\n") + LogMutex.Unlock() continue } if fdStderr != nil {