-   Linux - Newbie (
-   -   O_EXCL on device special files (

devershetty 06-19-2003 08:23 PM

O_EXCL on device special files

what does open on device special file /dev/hdax with O_EXCL flag mean ??
a. Does it mean an exclusive access of device file until it is closed??
b. Does it mean the device file is locked so that other programs for .eg mount can't access this device file.
or mount is blocked until lock on device file is released.

int fd;
chat * devfile = " /dev/hda9" ;

fd = open(devfile, O_RDWR | O_EXCL );

Mean while,
How to lock a device special file???
I mean i need for a daemon to lock a device file and mount command should not be able to acces this file?


All times are GMT -5. The time now is 04:39 PM.