mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-05 06:10:13 -05:00
Use more proper flags for the open() for flock()
This commit is contained in:
parent
7ffd018bfd
commit
df5b389afd
1 changed files with 1 additions and 1 deletions
|
|
@ -799,7 +799,7 @@ int lock_lock(const char* file)
|
||||||
{
|
{
|
||||||
int f;
|
int f;
|
||||||
|
|
||||||
f = open(file, O_CREAT | O_TRUNC | O_WRONLY, 0600);
|
f = open(file, O_RDONLY | O_CREAT, 0600);
|
||||||
if (f == -1) {
|
if (f == -1) {
|
||||||
/* LCOV_EXCL_START */
|
/* LCOV_EXCL_START */
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue