Provides access to the null device, typically for writing to the bit bucket.
The /dev/null special file provides character access to the null device driver. This device driver is normally accessed to write data to the bit bucket (when the data is to be discarded).
When using subroutines with the
null device file, consider the following items:
open and close subroutines | The null device can be opened by using the open subroutine with the /dev/null special file name. The close subroutine should be used when access to the null device is no longer required. |
read and write subroutines | Data written to this file is discarded. Reading from this file always returns 0 bytes. |
ioctl subroutine | There are no ioctl operations available for use with the null special file. Any ioctl operation issued returns with the ENODEV error type. |
The null special file is part of Base Operating System (BOS) Runtime.
The close subroutine, ioctl subroutine, open subroutine.