Convert "fcntl(n, F_CLOSEM)" to "closefrom(n)"
Submitted by: pho Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
10ee748942
commit
e90f6cb573
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=273521
@ -63,7 +63,11 @@ run(int flags)
|
||||
while ((i = open("/", O_RDONLY)) < 3)
|
||||
ATF_REQUIRE(i != -1);
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
closefrom(3);
|
||||
#else
|
||||
ATF_REQUIRE(fcntl(3, F_CLOSEM) != -1);
|
||||
#endif
|
||||
|
||||
ATF_REQUIRE(socketpair(AF_UNIX, SOCK_DGRAM | flags, 0, fd) == 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user