8 main (int argc
, char const **argv
)
11 int i
, rv
= 0; // Set breakpoint here.
13 // Make sure stdin/stdout/stderr exist.
14 for (i
= 0; i
<= 2; ++i
) {
15 if (fstat(i
, &buf
) != 0)
19 // Make sure no other file descriptors are open.
20 for (i
= 3; i
<= 256; ++i
) {
21 if (fstat(i
, &buf
) == 0 || errno
!= EBADF
) {
22 fprintf(stderr
, "File descriptor %d is open.\n", i
);