git: socket/socketpair: Add SOCK_{NONBLOCK,CLOEXEC} support.

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Thu Oct 29 20:40:24 PDT 2015


commit 36e1dffed76a1bcea1179feaf2fad92342aae291
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date:   Wed Oct 28 21:22:47 2015 +0800

    socket/socketpair: Add SOCK_{NONBLOCK,CLOEXEC} support.
    
    Obtained-from: FreeBSD
    Suggested-by: zrj on #dragonflybsd at efnet

Summary of changes:
 lib/libc/sys/socket.2                              | 11 ++-
 lib/libc/sys/socketpair.2                          | 11 ++-
 sys/kern/uipc_syscalls.c                           | 44 ++++++++++-
 sys/sys/socket.h                                   |  6 ++
 test/sockext/checkfd/Makefile                      |  6 ++
 test/sockext/checkfd/checkfd.c                     | 35 +++++++++
 test/sockext/socket/cloexec/Makefile               |  6 ++
 test/sockext/socket/cloexec/socket_cloexec.c       | 52 +++++++++++++
 test/sockext/socket/nonblock/Makefile              |  6 ++
 test/sockext/socket/nonblock/socket_nblock.c       | 91 ++++++++++++++++++++++
 test/sockext/socketpair/cloexec/Makefile           |  6 ++
 test/sockext/socketpair/cloexec/sockpair_cloexec.c | 50 ++++++++++++
 test/sockext/socketpair/nonblock/Makefile          |  6 ++
 test/sockext/socketpair/nonblock/sockpair_nblock.c | 68 ++++++++++++++++
 14 files changed, 394 insertions(+), 4 deletions(-)
 create mode 100644 test/sockext/checkfd/Makefile
 create mode 100644 test/sockext/checkfd/checkfd.c
 create mode 100644 test/sockext/socket/cloexec/Makefile
 create mode 100644 test/sockext/socket/cloexec/socket_cloexec.c
 create mode 100644 test/sockext/socket/nonblock/Makefile
 create mode 100644 test/sockext/socket/nonblock/socket_nblock.c
 create mode 100644 test/sockext/socketpair/cloexec/Makefile
 create mode 100644 test/sockext/socketpair/cloexec/sockpair_cloexec.c
 create mode 100644 test/sockext/socketpair/nonblock/Makefile
 create mode 100644 test/sockext/socketpair/nonblock/sockpair_nblock.c

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/36e1dffed76a1bcea1179feaf2fad92342aae291


-- 
DragonFly BSD source repository


More information about the Commits mailing list