qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 0/2] using qemu_set_nonblock() instead of fcntl(O_NO


From: arei.gonglei
Subject: [Qemu-devel] [PATCH 0/2] using qemu_set_nonblock() instead of fcntl(O_NONBLOCK)
Date: Mon, 11 Aug 2014 17:34:19 +0800

From: Gonglei <address@hidden>

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]