| PLEX86 | ||
|
Record Locking with fcntl: what to do if unlock F_UNLCK failsinto the Black Sun and said: At that point, removelock will return -1, and the calling code should handle that in whatever manner is appropriate. If you'd like to check which PID is holding the lock you'd like to release, "man 2 fcntl" should help, particularly the text near the FGETLK keyword. WARNING: This junk may or may not be portable. The basics of fcntl will be, but specifics might not be. Don't ask me; I haven't messed with fcntl on non-Linux platforms. If process N is holding a lock on file F, having process M close() file F won't help process M one bit. Fortunately, you can figure out which process is holding the lock with a few more lines of code. It's not even insanely difficult--unless there's some sort of subtle trap that I've missed in the man page--which *could* happen! A bit of short code made it clear that it seems to work as advertised though. HTH, RAID1 unable to boot Debian Etch kernel 2.6.16 I am trying to convert existing ext3 fs to raid1. I created parbreastion table on second hdd by "sfdisk -ddev-sda sfdiskdev-sdb... -- One OS to rule them all, with DRM to find them One OS to bring them all and with the EULA bind them In the Land of Redmond where the shadows lie. There is no Darkness in Eternity-But only Light too dim for us to see
|
||||
Linux groups from Newsgroups The #1 Usenet Provider on the Internet
|
||||