]> source.dussan.org Git - gitea.git/commit
Fix run command race (#1470)
authorMura Li <typeless@users.noreply.github.com>
Mon, 13 Nov 2017 14:51:45 +0000 (08:51 -0600)
committerLunny Xiao <xiaolunwen@gmail.com>
Mon, 13 Nov 2017 14:51:45 +0000 (22:51 +0800)
commitf4d12f8d9711d54b022ef28c39c670f36700f8f7
tree9ce1511be1d5406e26e55eaf75ff41b4a66ea7a1
parente9728bf3b4c763464db30e1259501cf38a7a20c7
Fix run command race (#1470)

* Use exec.CommandContext to simplfy timeout handling

And fixing the data races which can be identified by the added tests when -race enabled.

* Use sleep commmand instead of reading from stdin

* Make the error handling go-esque
modules/process/manager.go
modules/process/manager_test.go