Start systemd service from C/C++ application or call a D-Bus service

后端 未结 2 627
渐次进展
渐次进展 2021-01-02 12:29

I have a .service for a process that i don\'t want to start at boot-time, but to call it somehow from another already running application, at a given time.

The other

2条回答
  •  悲哀的现实
    2021-01-02 12:55

    I had trouble to do the same thing. The discover of : G_BUS_NAME_WATCHER_FLAGS_AUTO_START solve it.

    g_bus_watch_name(G_BUS_TYPE_SYSTEM, "com.mydbus.listen",
          G_BUS_NAME_WATCHER_FLAGS_AUTO_START, xOnNameAppeared, xOnNameVanished,
          this, nullptr);
    

提交回复
热议问题