From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Xu" <peterx@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>
Subject: [Qemu-devel] [PULL 1/5] chardev: comment details for CLOSED event
Date: Sat, 30 Jun 2018 18:27:40 +0200 [thread overview]
Message-ID: <20180630162744.15920-2-armbru@redhat.com> (raw)
In-Reply-To: <20180630162744.15920-1-armbru@redhat.com>
From: Peter Xu <peterx@redhat.com>
It was unclear before on what does the CLOSED event mean. Meanwhile we
add a TODO to fix up the CLOSED event in the future when the in/out
ports are different for a chardev.
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: "Marc-André Lureau" <marcandre.lureau@redhat.com>
CC: Stefan Hajnoczi <stefanha@redhat.com>
CC: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180620073223.31964-2-peterx@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
include/chardev/char.h | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/include/chardev/char.h b/include/chardev/char.h
index 04de45795e..6f0576e214 100644
--- a/include/chardev/char.h
+++ b/include/chardev/char.h
@@ -22,7 +22,16 @@ typedef enum {
CHR_EVENT_OPENED, /* new connection established */
CHR_EVENT_MUX_IN, /* mux-focus was set to this terminal */
CHR_EVENT_MUX_OUT, /* mux-focus will move on */
- CHR_EVENT_CLOSED /* connection closed */
+ CHR_EVENT_CLOSED /* connection closed. NOTE: currently this event
+ * is only bound to the read port of the chardev.
+ * Normally the read port and write port of a
+ * chardev should be the same, but it can be
+ * different, e.g., for fd chardevs, when the two
+ * fds are different. So when we received the
+ * CLOSED event it's still possible that the out
+ * port is still open. TODO: we should only send
+ * the CLOSED event when both ports are closed.
+ */
} QEMUChrEvent;
#define CHR_READ_BUF_LEN 4096
--
2.17.1
next prev parent reply other threads:[~2018-06-30 16:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-30 16:27 [Qemu-devel] [PULL 0/5] Monitor patches for 2018-06-30 Markus Armbruster
2018-06-30 16:27 ` Markus Armbruster [this message]
2018-06-30 16:27 ` [Qemu-devel] [PULL 2/5] monitor: rename *_pop_one to *_pop_any Markus Armbruster
2018-06-30 16:27 ` [Qemu-devel] [PULL 3/5] monitor: flush qmp responses when CLOSED Markus Armbruster
2018-06-30 16:27 ` [Qemu-devel] [PULL 4/5] tests: iotests: drop some stderr line Markus Armbruster
2018-06-30 16:27 ` [Qemu-devel] [PULL 5/5] docs: mention shared state protect for OOB Markus Armbruster
2018-06-30 18:00 ` [Qemu-devel] [PULL 0/5] Monitor patches for 2018-06-30 Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180630162744.15920-2-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).