projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df5c912
)
14360: Use nonblocking mode when checking for stale lock.
author
Tom Clegg <tclegg@veritasgenetics.com>
Fri, 7 Dec 2018 19:54:08 +0000
(14:54 -0500)
committer
Tom Clegg <tclegg@veritasgenetics.com>
Fri, 7 Dec 2018 19:54:08 +0000
(14:54 -0500)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg@veritasgenetics.com>
services/crunch-run/background.go
patch
|
blob
|
history
diff --git
a/services/crunch-run/background.go
b/services/crunch-run/background.go
index ee054f056fac8e69a66ae4e4f10a5f6082cac834..deaf09cec84a7cd3e3549a9223ff4a913ebc053c 100644
(file)
--- a/
services/crunch-run/background.go
+++ b/
services/crunch-run/background.go
@@
-160,7
+160,7
@@
func ListProcesses(stdout, stderr io.Writer) int {
// acquisition during races, e.g., by connecting to a
// unix socket or checking /proc/$pid/fd/$n ->
// lockfile.
- err = syscall.Flock(int(f.Fd()), syscall.LOCK_SH)
+ err = syscall.Flock(int(f.Fd()), syscall.LOCK_SH
|syscall.LOCK_NB
)
if err == nil {
// lockfile is stale
err := os.Remove(path)