diff options
author | Timo Sirainen <cras@irssi.org> | 2001-02-16 20:21:18 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-02-16 20:21:18 +0000 |
commit | e9b4784836fdbe2d1caffc71f23c3e68adda42bf (patch) | |
tree | 732c21a99d1878266dba86b5f87649e94c6ca52d /src | |
parent | 5e3a3e88a869b75d357506534b55ca5eaa1d6716 (diff) | |
download | irssi-e9b4784836fdbe2d1caffc71f23c3e68adda42bf.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/core/log.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |