Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Mar 2010 13:06:36 +0100
From:      Gary Jennejohn <gary.jennejohn@freenet.de>
To:        Andriy Gapon <avg@icyb.net.ua>
Cc:        ports@freebsd.org, wen heping <wenheping@gmail.com>, erwan@rail.eu.org
Subject:   Re: ports/144760: sysutils/tmux: shell not working in tmux any more
Message-ID:  <20100317130636.60ccdfae@ernst.jennejohn.org>
In-Reply-To: <4BA0A954.8070303@icyb.net.ua>
References:  <7be7a2801003151736m633f6503n81fab99617a6a9b4@mail.gmail.com> <20100316221624.GC3099@rail.eu.org> <7be7a2801003161730v6fc3b525q61563921ab1e86a8@mail.gmail.com> <4BA02904.4040807@barakmich.com> <7be7a2801003161824ja00f67ar92ba71dacb9781ec@mail.gmail.com> <7be7a2801003161946t3d751984laf3d86e0631bf782@mail.gmail.com> <4BA0A954.8070303@icyb.net.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 17 Mar 2010 12:05:08 +0200
Andriy Gapon <avg@icyb.net.ua> wrote:

> on 17/03/2010 04:46 wen heping said the following:
> > Hi,
> > 
> >    Would you test this patch ?
> >   If it works, I shall commit it.
> > 
> 
> I think that it would be interesting/useful to understand in what respect FreeBSD
> kqueue is considered 'broken' by tmux code.
> 

Actually it's the kqueue handling in devel/libevent, which is used by tmux,
which considers our kequeue(2) implementation to be broken.

The code in kqueue.c:kq_init() from libevent calls kevent() [kqueue(2)]
with nchanges=1 and nevents=64.  It assumes that kevent() will always
return 1 on success.  According to kqueue(2) kevent will return up to
nevents on success.  I'm not sure whether our kevent() should return 1
because nchanges=1 or not.

So the question is whether kq_init() is making a bad assumption or not.

In any case it seems that devel/libevent should be fixed, if necessary,
rather than applying a bandaid to tmux.

---
Gary Jennejohn



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100317130636.60ccdfae>