Skip to content

Commit 012c111

Browse files
committed
test@
1 parent e04551f commit 012c111

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

none/tests/fdleak.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ static void close_inherited (void) {
3535

3636
/* Only leave 0 (stdin), 1 (stdout) and 2 (stderr) open. */
3737
for (i = 3; i < max_fds; i++)
38-
if (fstat (i, &sb) != -1) /* Test if the file descriptor exists first. */
38+
if (fstat (i, &sb) != -1) { /* Test if the file descriptor exists first. */
39+
printf("trying to close fd %d\n", i);
3940
close(i);
41+
}
4042
}
4143
#define CLOSE_INHERITED_FDS close_inherited ()
4244
/* Note that the following would be nicer, but close_range is fairly new. */

0 commit comments

Comments
 (0)