Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/sys PR/51846: Ngie Cooper: closefrom(3) inste...
details: https://anonhg.NetBSD.org/src/rev/ebafb0a7a46c
branches: trunk
changeset: 350552:ebafb0a7a46c
user: christos <christos%NetBSD.org@localhost>
date: Fri Jan 13 20:04:52 2017 +0000
description:
PR/51846: Ngie Cooper: closefrom(3) instead of fcntl(3, F_CLOSEM)
for portability
diffstat:
tests/lib/libc/sys/t_socketpair.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 6242cd8cde47 -r ebafb0a7a46c tests/lib/libc/sys/t_socketpair.c
--- a/tests/lib/libc/sys/t_socketpair.c Fri Jan 13 20:03:51 2017 +0000
+++ b/tests/lib/libc/sys/t_socketpair.c Fri Jan 13 20:04:52 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_socketpair.c,v 1.1 2011/11/05 18:19:02 jruoho Exp $ */
+/* $NetBSD: t_socketpair.c,v 1.2 2017/01/13 20:04:52 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_socketpair.c,v 1.1 2011/11/05 18:19:02 jruoho Exp $");
+__RCSID("$NetBSD: t_socketpair.c,v 1.2 2017/01/13 20:04:52 christos Exp $");
#include <atf-c.h>
#include <fcntl.h>
@@ -63,7 +63,7 @@
while ((i = open("/", O_RDONLY)) < 3)
ATF_REQUIRE(i != -1);
- ATF_REQUIRE(fcntl(3, F_CLOSEM) != -1);
+ ATF_REQUIRE(closefrom(3) != -1);
ATF_REQUIRE(socketpair(AF_UNIX, SOCK_DGRAM | flags, 0, fd) == 0);
Home |
Main Index |
Thread Index |
Old Index