readme.filelocking

来自「相当优秀的 UNIX 进程管理工具」· FILELOCKING 代码 · 共 31 行

FILELOCKING
31
字号
Version 4.9.7 Release NotesFILE I/O and LOCKING CODE------------------------------------------------------------------The file i/o locking code has been audited. All code was changed toupdate files by opening the orignal file in read only mode, unlessit is the first time, then create it. Then open a temp file witha .pid extension. Make all the changes to the temp file. Then usethe rename(2) function call to automically move the new file overthe old file. This is similar to how some qmail file modificationis done.No read locks are requested for read only i/o.Write locks are requested for modify i/o.To reduce the locking load on the file system, a lock isnot requested for the .dir-control file. If we miss countinga user during a simulatious user addition, it's not theend of the world. The number of user entry in that fileis not meant to be exact. It is more of a guide line onhow to spread out user directories across the vpopmail 3 level user directory tree.This should reduce the over all file i/o synchronicity requirements. And hence reduce the possiblity of lostfile data (like loosing a complete vpasswd user file!!!)At least we are using the more reliable rename(2) function.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?