diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-10-28 14:51:30 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-10-28 15:06:05 -0400 |
| commit | a882ac7eefa405993ba903f19c51134341ba457c (patch) | |
| tree | 086e99ce1704b9ae5b44a429fcbf3d45f26edfae /src/Utility/Process/Shim.hs | |
| parent | 77b1375d3c286ffdd531ea41440eb3f319b16061 (diff) | |
fix tricky race
Race between 2 calls to takeOutputLock'. The first call empties the
TMVar, and does some work to check it. Meanwhile, the second call could
sneak in, see it was empty, and call waitlock. Since waitlock used
tryTakeTMVar, that would not block it, and it would think it had the lock,
filling the TMVar. In the meantime, the first call could decide it had to
lock and go on to possibly cause trouble.
Diffstat (limited to 'src/Utility/Process/Shim.hs')
0 files changed, 0 insertions, 0 deletions
