From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgcAS-0003Vq-SN for qemu-devel@nongnu.org; Tue, 12 Jul 2011 08:34:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QgcAM-0001I9-5i for qemu-devel@nongnu.org; Tue, 12 Jul 2011 08:34:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22089) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgcAL-0001Ht-LC for qemu-devel@nongnu.org; Tue, 12 Jul 2011 08:34:18 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6CCYFsW032073 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 12 Jul 2011 08:34:15 -0400 Date: Tue, 12 Jul 2011 18:04:12 +0530 From: Amit Shah Message-ID: <20110712123412.GC5810@amit-x200.redhat.com> References: <5444cc7ab1e9654fa953e626da1a50ce54a72ac7.1310462934.git.amit.shah@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5444cc7ab1e9654fa953e626da1a50ce54a72ac7.1310462934.git.amit.shah@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 1/1] virtio-console: Prevent abort()s in case of host chardev close List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu list Cc: Gerd Hoffmann , Markus Armbruster , Juan Quintela On (Tue) 12 Jul 2011 [14:58:57], Amit Shah wrote: > A host chardev could close just before the guest sends some data to be > written. This will cause an -EPIPE error. This shouldn't be propagated > to virtio-serial-bus. > > Ideally we should close the port once -EPIPE is received, but since the > chardev interface doesn't return such meaningful values to its users, > all we get is -1 for any kind of error. Just return 0 for now and wait > for chardevs to return better error messages to act better on the return > messages. For v2, removed the check for -EAGAIN as qemu-char.c doesn't return anything other than -1 for error conditions, as Markus and Juan noted. Amit