Descriptiongofmt: race condition in error reporting and setting exit code
How to reproduce:
$ mkdir /tmp/foo
$ cp /dev/null /tmp/foo/bar.go
$ chmod -r /tmp/foo/bar.go
$ gofmt /tmp/foo
open /tmp/foo/bar.go: permission denied
$ echo $? # should echo 2
0
$
Maybe you need to put a call to time.Sleep at the beginning of report().
Patch Set 1 #Patch Set 2 : code review 164073: gofmt: race condition in error reporting and setting ex... #
MessagesTotal messages: 3
|