Skip to content

Commit a7f553b

Browse files
committed
native service: Terminate ambient lighting daemon after glib mainloop ran
1 parent 55819f0 commit a7f553b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

service/src/main.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,8 @@ int main()
379379
service.daemon_version = NULL;
380380

381381
log_init();
382+
INFO("Starting up...");
383+
382384
log_set_level(Debug);
383385
LSErrorInit(&lserror);
384386

@@ -404,10 +406,19 @@ int main()
404406

405407
LSGmainAttach(handle, gmainLoop, &lserror);
406408

409+
DBG("Going into main loop..");
410+
407411
// run to check continuously for new events from each of the event sources
408412
g_main_loop_run(gmainLoop);
413+
414+
DBG("Main loop quit...");
415+
416+
DBG("Cleaning up service...");
417+
daemon_terminate(&service);
418+
409419
// Decreases the reference count on a GMainLoop object by one
410420
g_main_loop_unref(gmainLoop);
411421

422+
DBG("Service main finished");
412423
return 0;
413424
}

0 commit comments

Comments
 (0)