Wait till file contents changed
| From: | Danny | Date: | Mon, 07 Nov 2016 15:19:21 +0000 |
| Subject: | Wait till file contents changed | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-325825@lists.php.net to get a copy of this message | ||
Hi,
I am trying to figure out a way to do the following:
I have a cli script that has to wait untill the contents of a file has changed
from a "0" to a "1".
If it is a "0", the script must wait, if it is changed to a "1" the script must
continue. The "0" and "1" is written by a BASH script.
When the bash script is run , it echo's a "0" into the file to tell php that the
process has started and php should wait untill the process is finished which
occurs when the BASH script echo's a "1" into the same file.
Any pointers?
Thank you
Danny