Using the SC_RETAIN_RESERVATION Option
The SC_RETAIN_RESERVATION option causes the device driver to hold any established reservation as part of an open during the close of the device. For shared devices (for example, disk or CD-ROM), the device driver must OR together this option for all opens to a given device.
If any caller requests this option, the close routine does not issue the release even if other opens to the device do not set SC_RETAIN_RESERVATION. The device driver should require the caller to have appropriate authority to request the SC_RETAIN_RESERVATION option because this request can allow a program to monopolize a device (for example, if this is a nonshared device). If the caller attempts to initiate this system call without the proper authority, the device driver should return a value of -1, with the errno global variable set to a value of EPERM.