1closedir(3C)             Standard C Library Functions             closedir(3C)
2
3
4

NAME

6       closedir - close a directory stream
7

SYNOPSIS

9       #include <sys/types.h>
10       #include <dirent.h>
11
12       int closedir(DIR *dirp);
13
14

DESCRIPTION

16       The  closedir() function closes the directory stream referred to by the
17       argument dirp. Upon return, the value of dirp may no longer point to an
18       accessible  object  of  the  type  DIR. If a file descriptor is used to
19       implement type DIR, that file descriptor will be closed.
20

RETURN VALUES

22       Upon successful completion, closedir()  returns  0.  Otherwise,  −1  is
23       returned and errno is set to indicate the error.
24

ERRORS

26       The closedir() function may fail if:
27
28       EBADF    The dirp argument does not refer to an open directory stream.
29
30
31       EINTR    The closedir() function was interrupted by a signal.
32
33

ATTRIBUTES

35       See attributes(5) for descriptions of the following attributes:
36
37
38
39
40       ┌─────────────────────────────┬─────────────────────────────┐
41       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
42       ├─────────────────────────────┼─────────────────────────────┤
43       │Interface Stability          │Standard                     │
44       ├─────────────────────────────┼─────────────────────────────┤
45       │MT-Level                     │Safe                         │
46       └─────────────────────────────┴─────────────────────────────┘
47

SEE ALSO

49       opendir(3C), attributes(5), standards(5)
50
51
52
53SunOS 5.11                        24 Jul 2002                     closedir(3C)
Impressum