diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2015-12-29 13:29:00 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2015-12-29 13:29:00 +0100 |
| commit | d40104b8a35f01d31cad1f11e312e76e034ffc4a (patch) | |
| tree | 7670efd663a3c1a140b985f9bf01a7146603fd44 /prog/encodingexec.go | |
| parent | b17c5726f6dc911ac0d4c9be02c2a0d9a7dee393 (diff) | |
fileutil: fix race in ProcessTempDir
One goroutine decides that it needs to clean up an instance,
but before it tries to delete pid file it is preempted.
Then another goroutine cleans up this instances and creates
a new instances in the same dir.
Then first goroutine removes already new pid file and removes
the used dir.
Fix this by using flock on a lock file.
Add a test.
Diffstat (limited to 'prog/encodingexec.go')
0 files changed, 0 insertions, 0 deletions
