thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone
Blob Blame History Raw
From 40f55392d0bbe867547e5705c2be21d65924b024 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Fri, 9 Jun 2017 11:43:57 +0200
Subject: [PATCH 2/6] Do not hang on full PTY

RH-Author: Paolo Bonzini <pbonzini@redhat.com>
Message-id: <20170609114359.13036-2-pbonzini@redhat.com>
Patchwork-id: 75565
O-Subject: [RHEL7.4 qemu-kvm PATCH v2 1/3] Do not hang on full PTY
Bugzilla: 1452067
RH-Acked-by: David Hildenbrand <david@redhat.com>
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>

From: Don Slutz <dslutz@verizon.com>

Signed-off-by: Don Slutz <dslutz@verizon.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(cherry picked from commit fac6688a18574b6f2caa8c699a936e729ed53ece)
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 qemu-char.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/qemu-char.c b/qemu-char.c
index 5edca0a..08b2301 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -1182,6 +1182,7 @@ static CharDriverState *qemu_chr_open_pty(const char *id,
     }
 
     close(slave_fd);
+    qemu_set_nonblock(master_fd);
 
     chr = g_malloc0(sizeof(CharDriverState));
 
-- 
1.8.3.1