qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] using qemu_set_nonblock() instead of fcntl(O_NONBLOCK)
@ 2014-08-11  9:34 arei.gonglei
  2014-08-11  9:34 ` [Qemu-devel] [PATCH 1/2] qemu-char: " arei.gonglei
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: arei.gonglei @ 2014-08-11  9:34 UTC (permalink / raw)
  To: qemu-devel
  Cc: weidong.huang, mst, wangxinxin.wang, peter.huangpeng, Gonglei,
	kraxel, stefanha, pbonzini

From: Gonglei <arei.gonglei@huawei.com>

Technically, fcntl(soc, F_SETFL, O_NONBLOCK)
is incorrect since it clobbers all other file flags.
We can use F_GETFL to get the current flags, set or
clear the O_NONBLOCK flag, then use F_SETFL to set the flags.

Using the qemu_set_nonblock() wrapper.

BTW, qemu_set_nonblock() locate qemu/socket.h, some other files
can not call it, such as tap-linux.c, maybe we can consider 
pulling it out. Any ideas? Thanks.

Gonglei (2):
  qemu-char: using qemu_set_nonblock() instead of fcntl(O_NONBLOCK)
  channel-posix: using qemu_set_nonblock() instead of fcntl(O_NONBLOCK)

 qemu-char.c         | 4 ++--
 qga/channel-posix.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
1.7.12.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-08-12  9:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-11  9:34 [Qemu-devel] [PATCH 0/2] using qemu_set_nonblock() instead of fcntl(O_NONBLOCK) arei.gonglei
2014-08-11  9:34 ` [Qemu-devel] [PATCH 1/2] qemu-char: " arei.gonglei
2014-08-11 19:51   ` Eric Blake
2014-08-11  9:34 ` [Qemu-devel] [PATCH 2/2] channel-posix: " arei.gonglei
2014-08-11 19:52   ` Eric Blake
2014-08-12  9:02 ` [Qemu-devel] [PATCH 0/2] " Stefan Hajnoczi

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).