[luci] Pause for 1 second

Oskari Rauta oskari.rauta at gmail.com
Fri Dec 6 09:29:21 CET 2013


You could use lockfiles for this."touch"  a file in /var/lock before writing starts and remove it when your system call / C code
has finished writing the file. Then make a routine which skips reading of this file- or waits before lock file has been removed.

Tried to find some reading about this for you, but didn't come across a lot, but check this out and find out more if you need:
http://www.thegeekstuff.com/2012/04/linux-file-locking-types/

On 6.12.2013, at 9:05, Tek Wiz <tx2023 at gmail.com> wrote:

> In LuCI, how do I pause for 1 second or x seconds?
> 
> The reason is that one line causes data to be written to a file by a system call / C code,
> and the next line wants to read the data to show on the LuCI webpage.
> The data cannot be shown because it is trying to read the file while it is being written.
> 
> Thanks
> 
> _______________________________________________
> luci mailing list
> luci at lists.subsignal.org
> https://lists.subsignal.org/mailman/listinfo/luci



More information about the luci mailing list