Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
f0cf401c
Commit
f0cf401c
authored
Sep 22, 2023
by
Simon Stridsberg
Committed by
Dridi Boukelmoune
Oct 16, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Loop over FDs if close_range fails.
parent
13ae7d9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
vsub.c
lib/libvarnish/vsub.c
+6
-7
No files found.
lib/libvarnish/vsub.c
View file @
f0cf401c
...
...
@@ -38,9 +38,7 @@
#include <stdlib.h> // Solaris closefrom(3c)
#include <string.h>
#include <unistd.h> // BSD/Linux close_range(2)
#ifdef HAVE_WORKING_CLOSE_RANGE
#elif HAVE_CLOSEFROM
#else
#ifndef HAVE_CLOSEFROM
# include <dirent.h>
#endif
...
...
@@ -67,13 +65,14 @@ VSUB_closefrom(int fd)
assert
(
fd
>=
0
);
#ifdef HAVE_WORKING_CLOSE_RANGE
AZ
(
close_range
(
fd
,
~
0U
,
0
));
return
;
#elif HAVE_CLOSEFROM
#ifdef HAVE_CLOSEFROM
closefrom
(
fd
);
return
;
#else
# ifdef HAVE_WORKING_CLOSE_RANGE
if
(
close_range
(
fd
,
~
0U
,
0
)
==
0
)
return
;
# endif
char
buf
[
128
];
int
i
,
maxfd
=
0
;
DIR
*
d
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment