Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755681Ab0BORry (ORCPT ); Mon, 15 Feb 2010 12:47:54 -0500 Received: from mail-bw0-f213.google.com ([209.85.218.213]:65003 "EHLO mail-bw0-f213.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751556Ab0BORrx (ORCPT ); Mon, 15 Feb 2010 12:47:53 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=kfM3+gv4USR1esbWR5nzgzgzQgzKl9WsVeBg0geX9YbZd8Z5xJ74Cif4+waZuJeTli hMZK2JBWTFxHAZJD2U9tz3f9IKTeqZWffaxWnOQIK+/ogvVWTc8tUl1B9MdqMvj8zxHV 5D5i61OZEyA8h9/SfawrtpOtygF6p7DcHbslQ= Subject: Re: [patch/rfc] Make poll/select report error (POLLNVAL and EBADF) for unsupported files From: Eric Dumazet To: Davide Libenzi Cc: Linux Kernel Mailing List , Andrew Morton , stephane.thiell@cea.fr In-Reply-To: <1266255759.8262.26.camel@edumazet-laptop> References: <1266255759.8262.26.camel@edumazet-laptop> Content-Type: text/plain; charset="UTF-8" Date: Mon, 15 Feb 2010 18:47:47 +0100 Message-ID: <1266256067.8262.27.camel@edumazet-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 915 Lines: 33 Le lundi 15 février 2010 à 18:42 +0100, Eric Dumazet a écrit : > Hmm, according to POSIX : > > The poll() function shall support regular files, terminal and > pseudo-terminal devices, FIFOs, pipes, sockets ... > > Regular files shall always poll TRUE for reading and writing. > > > So unless I missed something, this patch could break some conformant > applications. > > In particular, if an application is polling() on stdin (usually a tty), > and other 'files', what's happening if we do : > > cat replay_file | application Doh.. I meant : application < replay_file > > Either it wont read stdin, or application exits without reading its > input. > -- 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/