forked from enlightenment/efl
parent
5e33a5798f
commit
c37ca95819
|
@ -204,7 +204,7 @@ main()
|
||||||
|
|
||||||
/* lock process, so that we only run one copy of this program */
|
/* lock process, so that we only run one copy of this program */
|
||||||
snprintf(file, sizeof(file), "%s/.efreet/lock", efreet_home_dir_get());
|
snprintf(file, sizeof(file), "%s/.efreet/lock", efreet_home_dir_get());
|
||||||
fd = open(file, O_CREAT | O_TRUNC | O_RDONLY, S_IRUSR | S_IWUSR);
|
fd = open(file, O_CREAT | O_RDONLY, S_IRUSR | S_IWUSR);
|
||||||
if (fd < 0) goto efreet_error;
|
if (fd < 0) goto efreet_error;
|
||||||
if (flock(fd, LOCK_EX | LOCK_NB) < 0) goto efreet_error;
|
if (flock(fd, LOCK_EX | LOCK_NB) < 0) goto efreet_error;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue