HP-UX Reference (11i v1 00/12) - 3 Library Functions A-M (vol 6)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/!!!intro.3c
________________________________________________________________
___ ___
d
directory(3C) directory(3C)
(void) closedir(dirp);
return FOUND;
}
}
(void) closedir(dirp);
return NOT_FOUND;
WARNINGS
readdir() and getdirentries() (see getdirentries(2) are the only ways to access remote NFS direc-
tories. Attempting to read a remote directory via NFS by using read() returns -1 and sets errno to
EISDIR (see read(2)).
APPLICATION USAGE
The header file required for these functions and the type of the return value from readdir() has been
changed for compatibility with System V Release 3 and the X/Open Portability Guide. See ndir(5) for a
description of the header file <ndir.h>, which is provided to allow existing HP-UX applications to compile
unmodified. <ndir.h> header file is obsoleted starting from HP-UX 10.30 and is available in
/usr/old/usr/include
directory.
New applications should use the <
dirent.h> header file for portability to System V and X/Open systems.
The <
ndir.h> header file is obsoleted starting from HP-UX 10.30 and is going to be removed in future
releases.
readdir() is unsafe in multithread applications.
closedir(), opendir(), readdir(), rewind-
dir()
, seekdir() and readdir_r() are thread-safe. These interfaces are not async-cancel-safe. A
cancellation point may occur when a thread is executing closedir() , opendir() , readdir(),
rewinddir() , seekdir() or readdir_r() .
Users of readdir_r() should note that readdir_r() now conforms with the POSIX.1c Threads standard.
The old prototype of readdir_r() is supported for compatibility with existing DCE applications only.
AUTHOR
directory was developed by AT&T, HP, and the University of California, Berkeley.
SEE ALSO
close(2), getdirentries(2), lseek(2), open(2), read(2), dir(4), dirent(5), ndir(5).
STANDARDS CONFORMANCE
closedir(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1
opendir(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1
readdir(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1
readdir_r() :POSIX.1c
rewinddir() : AES, SVID2, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1
seekdir(): AES, SVID3, XPG2, XPG3, XPG4
telldir(): AES, XPG2, XPG3, XPG4
Section 3146 3 HP-UX Release 11i: December 2000
___
___