1
Details: I have an app where:
I have an AJAX request with Jquery triggered every time new users are entered passing the data needed for a PHP file that receives them via POST and creates a JSON file with these dice.
The JSON file data will be interpreted with C language using libjson so that they are then stored in the database sqlite.
Question: How to make the C language "wait" and create a warning when this new file is generated so that another C function can automatically grab it and play in the second process?
In C language you can’t do that efficiently. What you can do 'and use other new file detection mechanisms and, with these mechanisms, run a compiled C program. I think your best solution is to do the PHP that receives the POST run the pre-compiled program.
– pmg
if you are on Linux, this may help you: (http://stackoverflow.com/questions/18692134/continuously-monitor-a-directory-in-linux-and-notify-when-a-new-file-is-availabl) or (http://unix.stackexchange.com/questions/24952/script-monitor-folder-new-files)
– cantoni
Because the database has to be accessed with the C language?
– lys
@MYS, the site is also being written in C language with the help of Mongoose, the database as well. (Language is a requirement of those who requested the project for its efficiency when it comes to embedded software)
– lys