From e9b4784836fdbe2d1caffc71f23c3e68adda42bf Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 16 Feb 2001 20:21:18 +0000 Subject: [PATCH] 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 --- src/core/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/log.c b/src/core/log.c index 58d95b1d..53951828 100644 --- a/src/core/log.c +++ b/src/core/log.c @@ -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);