I’ve written a parental control module for the front end (inspired by muxpass).
Currently, it’s working well for the frontend work (it’s able to detect if it’s enabled and show a 4 digit lock page, and can be enabled/disabled in the tweakadv page). It’s reading its new config file from a parent_lock.ini file, everything is fine.
The parental control config file allows to specify the maximum play time per day in the config file.
I’m now implementing the parental control logic which is split in 2 functions:
- Monitoring the clock/uptime. This is done, I can start it as a background process or a thread when the frontend starts (or when the parental control is enabled in the settings)
- Stopping the current core (if any running) and force displaying the lock page when time is up.
I’m not sure how to perform step 2 above.
Here are my questions:
- Does the frontend knows what core is running and can it pause it (via SIGSTOP maybe?) ?
- Can a background process communicate with the frontend and if yes, how ?