Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 28 Oct 2002 19:47:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 28 Oct 2002 19:47:13 -0500 Received: from outpost.ds9a.nl ([213.244.168.210]:41128 "EHLO outpost.ds9a.nl") by vger.kernel.org with ESMTP id ; Mon, 28 Oct 2002 19:47:11 -0500 Date: Tue, 29 Oct 2002 01:53:32 +0100 From: bert hubert To: Davide Libenzi Cc: Linux Kernel Mailing List , lse-tech@lists.sourceforge.net Subject: Re: and nicer too - Re: [PATCH] epoll more scalable than poll Message-ID: <20021029005332.GA32426@outpost.ds9a.nl> Mail-Followup-To: bert hubert , Davide Libenzi , Linux Kernel Mailing List , lse-tech@lists.sourceforge.net References: <20021029004034.GA32118@outpost.ds9a.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1303 Lines: 35 On Mon, Oct 28, 2002 at 04:57:12PM -0800, Davide Libenzi wrote: > > If that code dares to read immediatly from the fd without having an explicit > > POLLIN event, which also means that epoll can only be used in this fashion > > with nonblocking sockets. > > The epoll interface has to be used with non-blocking fds. The EAGAIN Ok, so that is two things that need to be in the manpage and probably in bold: 1) epoll only works on pipes and sockets (not on tty, not on files) 2) epoll must be used on non-blocking sockets only (and describe the race that happens otherwise) If you send me the source of your manpages I'll work it in if you want. I still vote for checking at insert time however unless that is too expensive. Yes, we want people to read the manpages and heed them, but we also not want to create interfaces that are needlessly errorprone. Regards, bert -- http://www.PowerDNS.com Versatile DNS Software & Services http://lartc.org Linux Advanced Routing & Traffic Control HOWTO - 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/