Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263088AbUDAT36 (ORCPT ); Thu, 1 Apr 2004 14:29:58 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262770AbUDAT3E (ORCPT ); Thu, 1 Apr 2004 14:29:04 -0500 Received: from x35.xmailserver.org ([69.30.125.51]:10152 "EHLO x35.xmailserver.org") by vger.kernel.org with ESMTP id S262897AbUDAT2M (ORCPT ); Thu, 1 Apr 2004 14:28:12 -0500 X-AuthUser: davidel@xmailserver.org Date: Thu, 1 Apr 2004 11:28:12 -0800 (PST) From: Davide Libenzi X-X-Sender: davide@bigblue.dev.mdolabs.com To: Ben Mansell cc: Linux Kernel Mailing List Subject: Re: epoll reporting events when it hasn't been asked to In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1072 Lines: 32 On Thu, 1 Apr 2004, Ben Mansell wrote: > > It is a feature. epoll OR user events with POLLHUP|POLLERR so that even if > > the user sets the event mask to zero, it can still know when something > > like those abnormal condition happened. Which problem do you see with this? > > What should the application do if it gets events that it didn't ask for? > If you choose to ignore them, the next time epoll_wait() is called it > will return instantly with these same messages, so the app will spin and > eat CPU. Shouldn't the application handle those exceptional conditions instead of ignoring them? > Perhaps it should only OR the user event with POLLHUP|POLLERR if > POLLIN or POLLOUT is set? This can certainly be done, since it's a one-liner fix. I'm not sure if it is the correct behaviour. Anyone else? - Davide - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/