chiark / gitweb /
Modernization
[elogind.git] / src / core / dbus-execute.c
index a00ad50795d7739796e721a80715ce82add3e85f..0a53207e590ca114a1a61f000f63ca8ca2d0b21d 100644 (file)
@@ -29,8 +29,7 @@
 #include "strv.h"
 #include "dbus-common.h"
 #include "syscall-list.h"
-
-DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_execute_append_kill_mode, kill_mode, KillMode);
+#include "fileio.h"
 
 DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_execute_append_input, exec_input, ExecInput);
 DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_execute_append_output, exec_output, ExecOutput);
@@ -162,11 +161,12 @@ int bus_execute_append_cpu_sched_priority(DBusMessageIter *i, const char *proper
                 n = c->cpu_sched_priority;
         else {
                 struct sched_param p;
-                n = 0;
 
                 zero(p);
                 if (sched_getparam(0, &p) >= 0)
                         n = p.sched_priority;
+                else
+                        n = 0;
         }
 
         if (!dbus_message_iter_append_basic(i, DBUS_TYPE_INT32, &n))
@@ -431,8 +431,6 @@ const BusProperty bus_exec_context_properties[] = {
         { "PrivateTmp",               bus_property_append_bool,              "b", offsetof(ExecContext, private_tmp)                  },
         { "PrivateNetwork",           bus_property_append_bool,              "b", offsetof(ExecContext, private_network)              },
         { "SameProcessGroup",         bus_property_append_bool,              "b", offsetof(ExecContext, same_pgrp)                    },
-        { "KillMode",                 bus_execute_append_kill_mode,          "s", offsetof(ExecContext, kill_mode)                    },
-        { "KillSignal",               bus_property_append_int,               "i", offsetof(ExecContext, kill_signal)                  },
         { "UtmpIdentifier",           bus_property_append_string,            "s", offsetof(ExecContext, utmp_id),                true },
         { "ControlGroupModify",       bus_property_append_bool,              "b", offsetof(ExecContext, control_group_modify)         },
         { "ControlGroupPersistent",   bus_property_append_tristate_false,    "b", offsetof(ExecContext, control_group_persistent)     },