Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/sys/kern Pull up revisions:
details: https://anonhg.NetBSD.org/src/rev/a1e54f92c74d
branches: netbsd-6
changeset: 775694:a1e54f92c74d
user: jdc <jdc%NetBSD.org@localhost>
date: Thu Feb 14 22:13:59 2013 +0000
description:
Pull up revisions:
src/sys/kern/uipc_socket.c revision 1.213
src/sys/kern/uipc_syscalls.c revision 1.160
(requested by christos in ticket #822).
PR/47569: Valery Ushakov: SOCK_NONBLOCK does not work because it does not
set SS_NBIO.
XXX: there are too many flags that mean the same thing in too many places=
,
and too many flags that mean the same thing and are different.
diffstat:
sys/kern/uipc_socket.c | 6 ++++--
sys/kern/uipc_syscalls.c | 8 ++++++--
2 files changed, 10 insertions(+), 4 deletions(-)
diffs (63 lines):
diff -r be44e3525926 -r a1e54f92c74d sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c Thu Feb 14 22:12:10 2013 +0000
+++ b/sys/kern/uipc_socket.c Thu Feb 14 22:13:59 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_socket.c,v 1.209.2.1 2012/07/12 17:11:17 riz Exp $ */
+/* $NetBSD: uipc_socket.c,v 1.209.2.2 2013/02/14 22:13:59 jdc Exp $ */
/*-
* Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.209.2.1 2012/07/12 17:11:17 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.209.2.2 2013/02/14 22:13:59 jdc Exp $");
#include "opt_compat_netbsd.h"
#include "opt_sock_counters.h"
@@ -585,6 +585,8 @@
fp->f_data = so;
fd_affix(curproc, fp, fd);
*fdout = fd;
+ if (flags & SOCK_NONBLOCK)
+ so->so_state |= SS_NBIO;
}
return error;
}
diff -r be44e3525926 -r a1e54f92c74d sys/kern/uipc_syscalls.c
--- a/sys/kern/uipc_syscalls.c Thu Feb 14 22:12:10 2013 +0000
+++ b/sys/kern/uipc_syscalls.c Thu Feb 14 22:13:59 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_syscalls.c,v 1.154.2.2 2013/01/07 16:53:18 riz Exp $ */
+/* $NetBSD: uipc_syscalls.c,v 1.154.2.3 2013/02/14 22:13:59 jdc 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.154.2.2 2013/01/07 16:53:18 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.154.2.3 2013/02/14 22:13:59 jdc Exp $");
#include "opt_pipe.h"
@@ -234,6 +234,8 @@
((flags & SOCK_NOSIGPIPE) ? FNOSIGPIPE : 0);
fp2->f_ops = &socketops;
fp2->f_data = so2;
+ if (flags & SOCK_NONBLOCK)
+ so2->so_state |= SS_NBIO;
error = soaccept(so2, nam);
so2->so_cred = kauth_cred_dup(so->so_cred);
sounlock(so);
@@ -424,6 +426,8 @@
(*fp)->f_type = DTYPE_SOCKET;
(*fp)->f_ops = &socketops;
(*fp)->f_data = so;
+ if (flags & SOCK_NONBLOCK)
+ so->so_state |= SS_NBIO;
return 0;
}
Home |
Main Index |
Thread Index |
Old Index