From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18900 invoked by alias); 11 Dec 2012 14:39:45 -0000 Received: (qmail 18890 invoked by uid 22791); 11 Dec 2012 14:39:44 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 11 Dec 2012 14:39:41 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBBEddph009736 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 11 Dec 2012 09:39:39 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qBBEdbPb032661; Tue, 11 Dec 2012 09:39:38 -0500 Message-ID: <50C745A9.50700@redhat.com> Date: Tue, 11 Dec 2012 14:39:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Hui Zhu CC: Tom Tromey , gdb-patches ml , Hui Zhu Subject: Re: [PATCH] Add fseek to ui-file References: <87txryx36w.fsf@fleche.redhat.com> <50C1BD45.9080709@redhat.com> <87zk1lel8o.fsf@fleche.redhat.com> <50C70C60.6080707@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-12/txt/msg00329.txt.bz2 On 12/11/2012 02:34 PM, Hui Zhu wrote: > What about add a flag to struct stdio_file to record the error in this fd. > When stdio_file_xxx get error, set it and throw error. > Each stdio_file_xxx function check this flag before do syscall. If > this fd get error, just return. That would allow the second caller to proceed as if no error had happened. That's not a good interface. -- Pedro Alves