开发者

Can a process lock a disk so that no other process can access it?

开发者 https://www.devze.com 2023-01-07 01:20 出处:网络
Is there a way for a process to lock an entire disk so that no other process can access any file on the disk until this process releases the lock? Disk i/o开发者_如何学C operations for the other proce

Is there a way for a process to lock an entire disk so that no other process can access any file on the disk until this process releases the lock? Disk i/o开发者_如何学C operations for the other processes would presumably block until the lock is released.

The OS in question is Linux.


Since everything on a Linux it's a file, you should try locking the file representing your device.

0

精彩评论

暂无评论...
验证码 换一张
取 消