chiark / gitweb /
cgroup: mount cgroup file systems to /sys/fs/cgroup instead of /cgroup
[elogind.git] / src / service.c
index 80cd6ad9c65eddb43a2d4b15986d5588b52f4594..d2ef1ad9070e11993ec103d1b16e04d42881b4f5 100644 (file)
@@ -2263,7 +2263,10 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
         assert(s);
         assert(pid >= 0);
 
-        success = is_clean_exit(code, status);
+        if (s->sysv_path)
+                success = is_clean_exit_lsb(code, status);
+        else
+                success = is_clean_exit(code, status);
 
         if (s->main_pid == pid) {
 
@@ -2451,6 +2454,9 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
                         }
                 }
         }
+
+        /* Notify clients about changed exit status */
+        unit_add_to_dbus_queue(u);
 }
 
 static void service_timer_event(Unit *u, uint64_t elapsed, Watch* w) {
@@ -2607,6 +2613,9 @@ static void service_notify_message(Unit *u, pid_t pid, char **tags) {
                 }
 
         }
+
+        /* Notify clients about changed status or main pid */
+        unit_add_to_dbus_queue(u);
 }
 
 static int service_enumerate(Manager *m) {
@@ -2941,7 +2950,9 @@ const UnitVTable service_vtable = {
         .bus_name_owner_change = service_bus_name_owner_change,
         .bus_query_pid_done = service_bus_query_pid_done,
 
+        .bus_interface = "org.freedesktop.systemd1.Service",
         .bus_message_handler = bus_service_message_handler,
+        .bus_invalidating_properties =  bus_service_invalidating_properties,
 
         .enumerate = service_enumerate
 };