diff options
-rw-r--r-- | src/rename_device.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rename_device.c b/src/rename_device.c index 36d8d32e..362b23f0 100644 --- a/src/rename_device.c +++ b/src/rename_device.c @@ -365,7 +365,8 @@ void take_lock() { int lockfd; while (1) { - lockfd = open(LOCKFILE, O_RDWR|O_CREAT|O_EXCL); + lockfd = open(LOCKFILE, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); + if (lockfd != -1) { write(lockfd,"%d\n",getpid()); close(lockfd); |