We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e04551f commit 012c111Copy full SHA for 012c111
none/tests/fdleak.h
@@ -35,8 +35,10 @@ static void close_inherited (void) {
35
36
/* Only leave 0 (stdin), 1 (stdout) and 2 (stderr) open. */
37
for (i = 3; i < max_fds; i++)
38
- if (fstat (i, &sb) != -1) /* Test if the file descriptor exists first. */
+ if (fstat (i, &sb) != -1) { /* Test if the file descriptor exists first. */
39
+ printf("trying to close fd %d\n", i);
40
close(i);
41
+ }
42
}
43
#define CLOSE_INHERITED_FDS close_inherited ()
44
/* Note that the following would be nicer, but close_range is fairly new. */
0 commit comments