Hello!

I'm using irssi on cygwin and it works great, I just have a little nuisance
with the log files - I can't read them while irssi is running, while if i
remember correctly on unix it was possbile to read the logs while irssi was
running.
So i tried removing the following pieces of code:

#ifdef HAVE_FCNTL
        memset(&lock, 0, sizeof(lock));
        lock.l_type = F_WRLCK;
        if (fcntl(log->handle, F_SETLK, &lock) == -1 && errno == EACCES) {
                close(log->handle);
                log->handle = -1;
                signal_emit("log locked", 1, log);
                log->failed = TRUE;
                return FALSE;
        }
#endif

#ifdef HAVE_FCNTL
        memset(&lock, 0, sizeof(lock));
        lock.l_type = F_UNLCK;
        fcntl(log->handle, F_SETLK, &lock);
#endif

and now it works ok.
So, I have a question, what other implications are there if I remove this
code?
Should this be made into a configurable option, or, are there other more
appropriate options for locking that would allow for it to work under cygwin
better? Or maybe is cygwin's locking too strict as it seems to me that only
write lock is used...
any hint?

Reply via email to