nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1Index: storeBackup/lib/fileDir.pl
2===================================================================
3--- storeBackup.orig/lib/fileDir.pl
4+++ storeBackup/lib/fileDir.pl
5@@ -21,7 +21,7 @@
6
7
8 use Digest::MD5 qw(md5_hex);
9-use Fcntl qw(O_RDWR O_CREAT);
10+use Fcntl qw(O_RDWR O_CREAT O_WRONLY O_EXCL);
11 use Fcntl ':mode';
12 use POSIX;
13 use Cwd 'abs_path';
14@@ -482,7 +482,7 @@ sub checkLockFile
15 '-str' => ["creating lock file <$lockFile>"]);
16
17 &::checkDelSymLink($lockFile, $prLog, 0x01);
18- open(FILE, '>', $lockFile) or
19+ sysopen(FILE, $lockFile, O_WRONLY | O_CREAT | O_EXCL) or
20 $prLog->print('-kind' => 'E',
21 '-str' => ["cannot create lock file <$lockFile>"],
22 '-exit' => 1);
23