[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [4888] Do not disturb old fd flags (eg O_APPEND) when setti
From: |
Thiemo Seufer |
Subject: |
[Qemu-devel] [4888] Do not disturb old fd flags (eg O_APPEND) when setting nonblock, by |
Date: |
Fri, 18 Jul 2008 16:34:44 +0000 |
Revision: 4888
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4888
Author: ths
Date: 2008-07-18 16:34:43 +0000 (Fri, 18 Jul 2008)
Log Message:
-----------
Do not disturb old fd flags (eg O_APPEND) when setting nonblock, by
Ian Jackson.
Modified Paths:
--------------
trunk/vl.c
Modified: trunk/vl.c
===================================================================
--- trunk/vl.c 2008-07-18 10:26:07 UTC (rev 4887)
+++ trunk/vl.c 2008-07-18 16:34:43 UTC (rev 4888)
@@ -2141,7 +2141,9 @@
void socket_set_nonblock(int fd)
{
- fcntl(fd, F_SETFL, O_NONBLOCK);
+ int f;
+ f = fcntl(fd, F_GETFL);
+ fcntl(fd, F_SETFL, f | O_NONBLOCK);
}
#endif /* !_WIN32 */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [4888] Do not disturb old fd flags (eg O_APPEND) when setting nonblock, by,
Thiemo Seufer <=