In commit 8ec372667c179fc65901456e67f6 we do have some
--cleanup
program option. That program flag is supposed to be run by ./helpcovid launched from some crontab(5) job running e.g. every five or ten minutes. It runs the hcv_background_periodic_cleanup C++ function in C++ file hcv_background.cc which should also be run periodically.
That hcv_background_periodic_cleanup C++ function is incomplete, and should cleanup both the database and any global data structure (protected by some std::mutex or std::recursive_mutex).
We may need to use also some std::condition_variable and/or synchronize threads using hcv_bg_event_fd so eventfd(2).
We might also synchronize threads using pipe(7) or temporary fifo(7).
In commit 8ec372667c179fc65901456e67f6 we do have some
program option. That program flag is supposed to be run by
./helpcovid
launched from some crontab(5) job running e.g. every five or ten minutes. It runs thehcv_background_periodic_cleanup
C++ function in C++ filehcv_background.cc
which should also be run periodically.That
hcv_background_periodic_cleanup
C++ function is incomplete, and should cleanup both the database and any global data structure (protected by somestd::mutex
orstd::recursive_mutex
). We may need to use also somestd::condition_variable
and/or synchronize threads usinghcv_bg_event_fd
so eventfd(2).We might also synchronize threads using pipe(7) or temporary fifo(7).