Add locks and other sync stuff

This commit is contained in:
Tulir Asokan
2019-04-27 15:02:21 +03:00
parent 60e3fe3927
commit bc7e2d9a1c
12 changed files with 339 additions and 160 deletions

View File

@ -95,7 +95,7 @@ func PrettyPanic(panic interface{}) {
var buf bytes.Buffer
fmt.Fprintln(&buf, panic)
buf.Write(debug.Stack())
err := ioutil.WriteFile(traceFile, buf.Bytes(), 0644)
err := ioutil.WriteFile(traceFile, buf.Bytes(), 0640)
if err != nil {
fmt.Println("Saving the stack trace to", traceFile, "failed:")