flock: Set default mode for open(2)
This commit is contained in:
parent
2652dcfd6c
commit
386fa3d2a7
2
flock.c
2
flock.c
|
@ -40,7 +40,7 @@ main(int argc, char *argv[])
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
if ((fd = open(*argv, O_RDONLY | O_CREAT)) < 0)
|
if ((fd = open(*argv, O_RDONLY | O_CREAT, 0644)) < 0)
|
||||||
eprintf("open %s:", *argv);
|
eprintf("open %s:", *argv);
|
||||||
|
|
||||||
if (flock(fd, flags | nonblk)) {
|
if (flock(fd, flags | nonblk)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user