flock() 返回 TRUE 为成功;返回FALSE为失败 (e.g. when a lock could not be acquired).
注意: 因为flock() 需要一个文件指针,you may have to use a special lock file to protect Access to a file that you intend to truncate by opening it in write mode (with a "w" or "w+" argument to fopen()).