close Subroutine Interface for Data Link Control (DLC) Devices
Purpose
Closes the generic data link control (GDLC) device manager using a file descriptor.
Syntax
int close ( fildes)
Description
The close subroutine disables a GDLC channel. If this is the last channel to close on a port, the GDLC device manager is reset to an idle state on that port and the communications device handler is closed.
Each GDLC supports the close subroutine interface by way of its dlcclose and dlcmpx entry points. This subroutine can be called from the process environment only.
Parameters
| Item | Description |
|---|---|
| fildes | Specifies the file descriptor of the GDLC being closed. |
Return Values
| Item | Description |
|---|---|
| 0 | Indicates a successful operation. |
| EBADF | Indicates a bad file number. This value is defined in the /usr/include/sys/errno.h file. |
If an error occurs, a value of -1 is also returned.