From: Don Slutz <dslutz@verizon.com>
To: Michael Tokarev <mjt@tls.msk.ru>, Don Slutz <dslutz@verizon.com>,
qemu-devel@nongnu.org, QEMU Trivial <qemu-trivial@nongnu.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-trivial] [PATCH 1/1] Do not hang on full PTY
Date: Mon, 29 Dec 2014 15:27:49 -0500 [thread overview]
Message-ID: <54A1B945.20509@terremark.com> (raw)
In-Reply-To: <54A125E6.4050807@msgid.tls.msk.ru>
On 12/29/14 04:59, Michael Tokarev wrote:
> 22.12.2014 18:04, Don Slutz wrote:
>
>> --- a/qemu-char.c
>> +++ b/qemu-char.c
>> @@ -1387,6 +1387,7 @@ static CharDriverState *qemu_chr_open_pty(const char *id,
>> }
>>
>> close(slave_fd);
>> + qemu_set_nonblock(master_fd);
>>
>> chr = qemu_chr_alloc();
>
>
> Hm. I'm not sure at all this is a trivial change. While the
> patch itself is trivial indeed, it changes behavour of the file
> descriptor significantly. Are all the places where this fd is
> subsequently used prepared for it being non-blocking? Oh well... ;)
I was not sure on this being trivial also, but it looked like it could
be to me. The uses of this FD all looked that they handle non-blocking.
Here are the calls to qemu_set_nonblock in qemu-char.c (including this
add) :
b qemu-char.c qemu_chr_open_fd 1070
qemu_set_nonblock(fd_out);
c qemu-char.c qemu_chr_open_stdio 1166
qemu_set_nonblock(0);
d qemu-char.c qemu_chr_open_pty 1390
qemu_set_nonblock(master_fd);
e qemu-char.c tcp_chr_add_client 2952
qemu_set_nonblock(fd);
f qemu-char.c qmp_chardev_open_serial 4060
qemu_set_nonblock(fd);
g qemu-char.c qmp_chardev_open_socket 4172
qemu_set_nonblock(s->listen_fd);
So there are many cases where the FD is non-blocking already.
Hope this info helps.
>
> Thanks,
>
> /mjt
>
WARNING: multiple messages have this Message-ID (diff)
From: Don Slutz <dslutz@verizon.com>
To: Michael Tokarev <mjt@tls.msk.ru>, Don Slutz <dslutz@verizon.com>,
qemu-devel@nongnu.org, QEMU Trivial <qemu-trivial@nongnu.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH 1/1] Do not hang on full PTY
Date: Mon, 29 Dec 2014 15:27:49 -0500 [thread overview]
Message-ID: <54A1B945.20509@terremark.com> (raw)
In-Reply-To: <54A125E6.4050807@msgid.tls.msk.ru>
On 12/29/14 04:59, Michael Tokarev wrote:
> 22.12.2014 18:04, Don Slutz wrote:
>
>> --- a/qemu-char.c
>> +++ b/qemu-char.c
>> @@ -1387,6 +1387,7 @@ static CharDriverState *qemu_chr_open_pty(const char *id,
>> }
>>
>> close(slave_fd);
>> + qemu_set_nonblock(master_fd);
>>
>> chr = qemu_chr_alloc();
>
>
> Hm. I'm not sure at all this is a trivial change. While the
> patch itself is trivial indeed, it changes behavour of the file
> descriptor significantly. Are all the places where this fd is
> subsequently used prepared for it being non-blocking? Oh well... ;)
I was not sure on this being trivial also, but it looked like it could
be to me. The uses of this FD all looked that they handle non-blocking.
Here are the calls to qemu_set_nonblock in qemu-char.c (including this
add) :
b qemu-char.c qemu_chr_open_fd 1070
qemu_set_nonblock(fd_out);
c qemu-char.c qemu_chr_open_stdio 1166
qemu_set_nonblock(0);
d qemu-char.c qemu_chr_open_pty 1390
qemu_set_nonblock(master_fd);
e qemu-char.c tcp_chr_add_client 2952
qemu_set_nonblock(fd);
f qemu-char.c qmp_chardev_open_serial 4060
qemu_set_nonblock(fd);
g qemu-char.c qmp_chardev_open_socket 4172
qemu_set_nonblock(s->listen_fd);
So there are many cases where the FD is non-blocking already.
Hope this info helps.
>
> Thanks,
>
> /mjt
>
next prev parent reply other threads:[~2014-12-29 20:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-22 15:04 [Qemu-trivial] [PATCH 1/1] Do not hang on full PTY Don Slutz
2014-12-22 15:04 ` [Qemu-devel] " Don Slutz
2014-12-29 9:59 ` [Qemu-trivial] " Michael Tokarev
2014-12-29 9:59 ` [Qemu-devel] " Michael Tokarev
2014-12-29 20:27 ` Don Slutz [this message]
2014-12-29 20:27 ` Don Slutz
2014-12-29 23:41 ` [Qemu-trivial] [Qemu-devel] " Peter Maydell
2014-12-29 23:41 ` [Qemu-devel] [Qemu-trivial] " Peter Maydell
2014-12-31 1:56 ` [Qemu-trivial] [Qemu-devel] " Don Slutz
2014-12-31 1:56 ` [Qemu-devel] [Qemu-trivial] " Don Slutz
2015-01-07 6:02 ` Paolo Bonzini
2015-01-07 6:02 ` [Qemu-devel] " Paolo Bonzini
2015-01-12 8:56 ` Michael Tokarev
2015-01-12 8:56 ` [Qemu-devel] " Michael Tokarev
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=54A1B945.20509@terremark.com \
--to=dslutz@verizon.com \
--cc=aliguori@amazon.com \
--cc=mjt@tls.msk.ru \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.