The closedir callable service closes a directory.
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1CLD): | 31-bit |
AMODE (BPX4CLD): | 64-bit |
ASC mode: | Primary mode |
Interrupt status: | Enabled for interrupts |
Locks: | Unlocked |
Control parameters: | All parameters must be addressable by the caller and in the primary address space. |
|
AMODE 64 callers use BPX4CLD with the same parameters.
The name of a fullword that contains the directory file descriptor that was returned when the directory was opened.
The name of a fullword in which the closedir service returns 0 if the request is successful, or -1 if it is not successful.
Return_code | Explanation |
---|---|
EBADF | The Directory_file_descriptor parameter does not represent an open directory. |
EINTR | The service was interrupted by a signal while it was processing a closedir request. The directory may or may not be closed. |
The name of a fullword in which the closedir service stores the reason code. The closedir service returns Reason_code only if Return_value is -1. Reason_code further qualifies the Return_code value. For the reason codes, see z/OS UNIX System Services Messages and Codes.
There are no restrictions on the use of the closedir service.
For an example using this callable service, see BPX1CLD (closedir) example.