Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern PR/48292: Justin Cormack: paccept creates sockets t...
details: https://anonhg.NetBSD.org/src/rev/b88550d09ee2
branches: trunk
changeset: 790438:b88550d09ee2
user: christos <christos%NetBSD.org@localhost>
date: Wed Oct 09 18:55:56 2013 +0000
description:
PR/48292: Justin Cormack: paccept creates sockets that cannot be made blocking
Reset the socket flags not just the file flags for non-blocking I/O.
XXX: pullup 6
diffstat:
sys/kern/uipc_syscalls.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 97dcac4fc1df -r b88550d09ee2 sys/kern/uipc_syscalls.c
--- a/sys/kern/uipc_syscalls.c Wed Oct 09 17:18:23 2013 +0000
+++ b/sys/kern/uipc_syscalls.c Wed Oct 09 18:55:56 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_syscalls.c,v 1.163 2013/10/08 00:29:24 christos Exp $ */
+/* $NetBSD: uipc_syscalls.c,v 1.164 2013/10/09 18:55:56 christos Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.163 2013/10/08 00:29:24 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.164 2013/10/09 18:55:56 christos Exp $");
#include "opt_pipe.h"
@@ -235,8 +235,10 @@
((flags & SOCK_NOSIGPIPE) ? FNOSIGPIPE : 0);
fp2->f_ops = &socketops;
fp2->f_data = so2;
- if (flags & SOCK_NONBLOCK)
+ if (fp2->f_flag & FNONBLOCK)
so2->so_state |= SS_NBIO;
+ else
+ so2->so_state &= ~SS_NBIO;
error = soaccept(so2, nam);
so2->so_cred = kauth_cred_dup(so->so_cred);
sounlock(so);
Home |
Main Index |
Thread Index |
Old Index