flock: Set default mode for open(2)

This commit is contained in:
sin 2015-10-07 10:22:46 +01:00
parent 2652dcfd6c
commit 386fa3d2a7

View File

@ -40,7 +40,7 @@ main(int argc, char *argv[])
if (argc < 2)
usage();
if ((fd = open(*argv, O_RDONLY | O_CREAT)) < 0)
if ((fd = open(*argv, O_RDONLY | O_CREAT, 0644)) < 0)
eprintf("open %s:", *argv);
if (flock(fd, flags | nonblk)) {