projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6de5998
)
Add explanatory comment to make_unix_socket().
author
Ben Pfaff
<blp@nicira.com>
Fri, 3 Oct 2008 22:10:31 +0000
(15:10 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Mon, 6 Oct 2008 16:52:30 +0000
(09:52 -0700)
lib/socket-util.c
patch
|
blob
|
history
diff --git
a/lib/socket-util.c
b/lib/socket-util.c
index ca08de5a597bee0268080faac8d3e5e09a660ad9..7d54a4818514416ce827346efb489cfea5d13bed 100644
(file)
--- a/
lib/socket-util.c
+++ b/
lib/socket-util.c
@@
-201,6
+201,10
@@
make_unix_socket(int style, bool nonblock, bool passcred UNUSED,
return -errno;
}
+ /* Set nonblocking mode right away, if we want it. This prevents blocking
+ * in connect(), if connect_path != NULL. (In turn, that's a corner case:
+ * it will only happen if style is SOCK_STREAM or SOCK_SEQPACKET, and only
+ * if a backlog of un-accepted connections has built up in the kernel.) */
if (nonblock) {
int flags = fcntl(fd, F_GETFL, 0);
if (flags == -1) {