| 65 | } |
| 66 | |
| 67 | int cmFileLock::LockFile(int cmd, int type) const |
| 68 | { |
| 69 | struct ::flock lock; |
| 70 | lock.l_start = 0; |
| 71 | lock.l_len = 0; // lock all bytes |
| 72 | lock.l_pid = 0; // unused (for F_GETLK only) |
| 73 | lock.l_type = static_cast<short>(type); // exclusive lock |
| 74 | lock.l_whence = SEEK_SET; |
| 75 | return ::fcntl(this->File, cmd, &lock); |
| 76 | } |
no outgoing calls
no test coverage detected