chiark / gitweb /
set nice/oom_adjust only when asked for
[elogind.git] / execute.h
index b7dbe68491eb26ea0a47860a832e3baa716c36e3..04b9f6ef8b945f7eb456755e5ea8a8af55056cd4 100644 (file)
--- a/execute.h
+++ b/execute.h
@@ -16,6 +16,16 @@ typedef struct ExecContext ExecContext;
 #include "list.h"
 #include "util.h"
 
+/* Abstract namespace! */
+#define LOGGER_SOCKET "/systemd/logger"
+
+typedef enum ExecOutput {
+        EXEC_CONSOLE,
+        EXEC_NULL,
+        EXEC_SYSLOG,
+        EXEC_KERNEL
+} ExecOutput;
+
 struct ExecStatus {
         pid_t pid;
         usec_t timestamp;
@@ -33,11 +43,19 @@ struct ExecCommand {
 struct ExecContext {
         char **environment;
         mode_t umask;
-        struct rlimit *rlimit[RLIMIT_NLIMITS];
+        struct rlimit *rlimit[RLIMIT_NLIMITS];  /* FIXME: load-fragment parser missing */
+        char *directory;
         int oom_adjust;
         int nice;
-        char *directory;
 
+        bool oom_adjust_set:1;
+        bool nice_set:1;
+
+        ExecOutput output;
+        int syslog_priority;
+        char *syslog_identifier;
+
+         /* FIXME: all privs related settings need parser and enforcer */
         cap_t capabilities;
         bool capabilities_set:1;
 
@@ -72,7 +90,8 @@ typedef enum ExitStatus {
         EXIT_MEMORY,
         EXIT_LIMITS,
         EXIT_OOM_ADJUST,
-        EXIT_SIGNAL_MASK
+        EXIT_SIGNAL_MASK,
+        EXIT_OUTPUT
 } ExitStatus;
 
 int exec_spawn(const ExecCommand *command, const ExecContext *context, int *fds, unsigned n_fds, pid_t *ret);