diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-10-07 23:07:39 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-10-08 12:55:15 +0200 |
commit | a34ceba66fc0e856d8f76f340389a4768b57a365 (patch) | |
tree | b34ee4cf6eda0d1fef3df2235c58252b96958c69 /src/core/execute.h | |
parent | 66cb2fde7b0ab6603775ad13c30c004f5fd88f0c (diff) |
core: add support for setting stdin/stdout/stderr for transient services
When starting a transient service, allow setting stdin/stdout/stderr fds
for it, by passing them in via the bus.
This also simplifies some of the serialization code for units.
Diffstat (limited to 'src/core/execute.h')
-rw-r--r-- | src/core/execute.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/core/execute.h b/src/core/execute.h index f1c37116fd..f8995a4203 100644 --- a/src/core/execute.h +++ b/src/core/execute.h @@ -208,23 +208,22 @@ struct ExecContext { struct ExecParameters { char **argv; + char **environment; int *fds; char **fd_names; unsigned n_fds; - char **environment; - - bool apply_permissions; - bool apply_chroot; - bool apply_tty_stdin; + bool apply_permissions:1; + bool apply_chroot:1; + bool apply_tty_stdin:1; - bool confirm_spawn; - bool selinux_context_net; + bool confirm_spawn:1; + bool selinux_context_net:1; + bool cgroup_delegate:1; CGroupMask cgroup_supported; const char *cgroup_path; - bool cgroup_delegate; const char *runtime_prefix; @@ -234,6 +233,10 @@ struct ExecParameters { char *bus_endpoint_path; int bus_endpoint_fd; + + int stdin_fd; + int stdout_fd; + int stderr_fd; }; int exec_spawn(Unit *unit, |