#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;
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;
EXIT_EXEC,
EXIT_MEMORY,
EXIT_LIMITS,
- EXIT_OOM_ADJUST
+ EXIT_OOM_ADJUST,
+ EXIT_SIGNAL_MASK,
+ EXIT_OUTPUT
} ExitStatus;
int exec_spawn(const ExecCommand *command, const ExecContext *context, int *fds, unsigned n_fds, pid_t *ret);
void exec_command_free_list(ExecCommand *c);
void exec_command_free_array(ExecCommand **c, unsigned n);
+char *exec_command_line(ExecCommand *c);
+void exec_command_dump(ExecCommand *c, FILE *f, const char *prefix);
+void exec_command_dump_list(ExecCommand *c, FILE *f, const char *prefix);
+
void exec_context_init(ExecContext *c);
void exec_context_done(ExecContext *c);
void exec_context_dump(ExecContext *c, FILE* f, const char *prefix);