aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rename_device.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rename_device.c b/src/rename_device.c
index c6a99152..8e28154d 100644
--- a/src/rename_device.c
+++ b/src/rename_device.c
@@ -247,7 +247,9 @@ void take_lock() {
write(lockfd,buf,strlen(buf));
close(lockfd);
break;
- }
+ } else if (errno == EACCES)
+ break;
+
count++;
/* If we've slept for 20 seconds, break the lock. */
if (count >= 200) {