From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIYXp-00023A-HL for qemu-devel@nongnu.org; Mon, 11 Jan 2016 04:13:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIYXo-00082d-KQ for qemu-devel@nongnu.org; Mon, 11 Jan 2016 04:13:45 -0500 Sender: Paolo Bonzini References: <569368F6.3050704@msgid.tls.msk.ru> From: Paolo Bonzini Message-ID: <56937240.2080305@redhat.com> Date: Mon, 11 Jan 2016 10:13:36 +0100 MIME-Version: 1.0 In-Reply-To: <569368F6.3050704@msgid.tls.msk.ru> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Keep pty slave file descriptor open until the master is closed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev , Ashley Jonathan , "qemu-devel@nongnu.org" Cc: "qemu-trivial@nongnu.org" On 11/01/2016 09:33, Michael Tokarev wrote: > 11.12.2015 14:29, Ashley Jonathan wrote: >> I have experienced a minor difficulty using QEMU with the "-serial pty" option: >> >> If a process opens the slave pts device, writes data to it, then immediately closes it, the data doesn't reliably get delivered to the emulated serial port. This seems to be because a read of the master pty device returns EIO on Linux if no process has the pts device open, even when data is waiting "in the pipe". >> >> A fix seems to be for QEMU to keep the pts file descriptor open until the pty is closed, as per the below patch. > > The patch looks fine, so > > Reviewed-by: Michael Tokarev > > but I'd love to have an ACK from the maintainer about this one, > or for it to pick it up. Ok, I'll pick it up after I've read up a bit more on PTYs. Paolo