1

I have an app that lists other apps in a menu, and the goal is to consistently check which ones are "live" and to order them based on whether or not they're live or disabled. Unfortunately the apps, though they are built using a single framework currently, may likely be built using something else in the future. So a method I thought of is somehow checking the systemctl status of the apps frequently. I don't need to run the system through this app, just check if each app in the list is "live." Is there any way, using C++, to check and parse the systemctl status of a process?

  • `popen("systemctl status service")`? – KamilCuk Feb 21 '19 at 17:45
  • Hey RadioactiveMicrobe, in case you're still around, could you clarify whether something like what KamilCuk suggested would work for you? Or if not, why not? Also, is https://stackoverflow.com/questions/50780221/simple-c-or-c-api-for-controlling-systemd-services of any help? – David Z Aug 13 '20 at 00:46

0 Answers0