I locked a file and I am trying to test how the system reacts to a locked file.
I would like other processes to wait for the process to be released until they can require_once
that file again and not to come back with an error.
问题不是我做的事,我似乎无法锁定档案,在另一个进程要求档案时也做一些等待,并且看到系统对该锁档案的反应。
I tried
1. sleep()
which doesn t work, it halts the whole php engine.
2. I created a batch file that simply pauses until you hit enter. and used exec("cmd.exe /c START c:\1.bat");
因此,主角是,所有程序实际上都是任务的一个系列,这样,如果出于任何原因暂停使用,那么所有其他程序都是如此?
so How can I test if a file is locked ?
But of course if I am right, what s the point in locking the file whatsoever if other processes can t access it anyway?