mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Getting an exclusive lock on a file with TryExLock() requires write access, therefor O_RDONLY is wrong here. This worked back when we were using flock() for file locking, because flock() doesn't need write access for an exclusive locks. This fixes a bug where "--makeconf" claims that there is already a znc instance running on the config file. This happened because it mis-interpreted the -EBADF error from fcntl() as "something else already has a lock". Signed-off-by: Uli Schlachter <psychon@znc.in>
7.1 KiB
7.1 KiB