go { cmd.Run() } means the cmd will be destructed,
and stdin/stdout/stderr closed, concurrently with
other goroutines trying to access stdin/stdout/stderr.
Instead, do it the more traditional way and let the callers
who create those subprocesses explicitly manage their lifetime.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
The Go race detector will kill the test if it tries to have more than
8192 goroutines active at once, so start 8,000 instead of 100,000.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Fix a race where the state lock in a Unixy lockfile structure wasn't
being used to protect access to all of the structure's state fields.
Fix usage of sync/atomic in the corresponding unit tests to not mix
atomic adds and reads with non-atomic reads, something which the race
detector complained about.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>