|
发表于 2009-9-29 13:53:52
|
显示全部楼层
flock(file,lock,block)
Parameter参数 Description描述
file Required. Specifies an open file to lock or release
必要参数。指定需要执行操作的文件对象
lock Required. Specifies what kind of lock to use.
必要参数。指定“锁”的方式。
Possible values:
可能值:
* LOCK_SH - Shared lock (reader). Allow other processes to access the file
LOCK_SH – 共享的锁[Shared lock](读者reader)。允许其它进程访问文件
* LOCK_EX - Exclusive lock (writer). Prevent other processes from accessing the file
LOCK_EX – 独占的锁[Exclusive lock](作者writer)。组织其它进程访问文件
* LOCK_UN - Release a shared or exclusive lock
LOCK_UN – 释放一个共享的或独占的锁
* LOCK_NB - Avoids blocking other processes while locking
LOCK_NB – 当上锁时,阻止其它进程运行
block Optional. Set to 1 to block other processes while locking
可选参数。如果设置为1,那么阻止显示其它进程
你的flock()函数只写了一个参数 |
|