diff options
| author | Mattias Andrée <maandree@operamail.com> | 2014-08-12 11:18:33 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@operamail.com> | 2014-08-12 11:18:33 +0200 |
| commit | 1d7827e613663cf3bc504672a0ddbea695198e74 (patch) | |
| tree | 06cf4e549d931c079d70d305cede7e4beba6b10d /src/__main__.py | |
| parent | dist (diff) | |
| download | cmdipc-1d7827e613663cf3bc504672a0ddbea695198e74.tar.gz cmdipc-1d7827e613663cf3bc504672a0ddbea695198e74.tar.bz2 cmdipc-1d7827e613663cf3bc504672a0ddbea695198e74.tar.xz | |
race condition1.1
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/__main__.py')
| -rwxr-xr-x | src/__main__.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/__main__.py b/src/__main__.py index b835aee..114c9af 100755 --- a/src/__main__.py +++ b/src/__main__.py @@ -286,14 +286,10 @@ try: if not use_posix: s.P(timeout) s.Z(timeout) - try: - m.P(0) - except ipc.BusyError: - pass - else: - if s.value == 0: - s.set_value(threshold) - m.V() + m.P() + if s.value == 0: + s.set_value(threshold) + m.V() else: x.P(timeout) c.V() |
