bgentry / speakeasy

cross-platform Golang helpers for reading password input without cgo
Other
116 stars 24 forks source link

Prevent Wait4 data race #9

Closed lukechampine closed 9 years ago

lukechampine commented 9 years ago

getPassword and echoOn were concurrently writing to the same global ws variable, causing a data race. We don't actually care about the value of ws in this code, so we can simply pass a nil to syscall.Wait4 instead.

bgentry commented 9 years ago

Nice fix, thanks!