Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755801AbYBAP1z (ORCPT ); Fri, 1 Feb 2008 10:27:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753372AbYBAP1r (ORCPT ); Fri, 1 Feb 2008 10:27:47 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:36489 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752120AbYBAP1q (ORCPT ); Fri, 1 Feb 2008 10:27:46 -0500 Date: Fri, 1 Feb 2008 10:27:46 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Salvador Eduardo Tropea cc: USB list , Kernel development list Subject: Should nonblocking I/O calls to a disconnected device get an error? [was: Problem: hiddev stops sending events after some error recoveries] In-Reply-To: <47A3071B.9090908@inti.gov.ar> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 971 Lines: 21 On Fri, 1 Feb 2008, Salvador Eduardo Tropea wrote: > Now, I tried unplugging the device while executing a NONBLOCKing > program. I didn't get any I/O error. It means I was wrong about the > difference between unplugging the device and the effect of a recovery > like the one I mentioned previously. You are right, but IMHO that's odd, > the device should also inform I/O error when reading using a NONBLOCKing > file handler. Currently a program must use blocking reads in order to > get notified about the problem. It looks bad and lacks consistency. What > do you think? I don't know. Other people have debated this issue in the past, but I can't remember what the final decision was or the reasons for it. Alan Stern -- 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/