15 /* open a dir stream */
16 dirp
= opendir ("/tmp");
26 /* close the directory file descriptor, making it invalid */
27 if (close (dirfd (dirp
)) != 0)
29 puts ("could not close directory file descriptor");
30 /* This is not an error. It is not guaranteed this is possible. */
36 return ent
!= NULL
|| errno
!= EBADF
;