mirror of
https://github.com/irssi/irssi.git
synced 2024-10-27 05:20:20 -04:00
If log file locking fails, check that it failed because file was
locked, not because filesystem doesn't know locks or some other reason. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1219 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
5e3a3e88a8
commit
e9b4784836
@ -120,7 +120,7 @@ int log_start_logging(LOG_REC *log)
|
||||
#ifdef HAVE_FCNTL
|
||||
memset(&lock, 0, sizeof(lock));
|
||||
lock.l_type = F_WRLCK;
|
||||
if (fcntl(log->handle, F_SETLK, &lock) == -1) {
|
||||
if (fcntl(log->handle, F_SETLK, &lock) == -1 && errno == EACCES) {
|
||||
close(log->handle);
|
||||
log->handle = -1;
|
||||
signal_emit("log locked", 1, log);
|
||||
|
Loading…
Reference in New Issue
Block a user