core/exec: add a named-descriptor option ("fd") for streams (#4179)

System Internals / systemd - Luca Bruno [coreos.com] - 17 October 2016 19:05 UTC

This commit adds a `fd` option to `StandardInput=`, `StandardOutput=` and `StandardError=` properties in order to connect standard streams to externally named descriptors provided by some socket units.

This option looks for a file descriptor named as the corresponding stream. Custom names can be specified, separated by a colon. If multiple name-matches exist, the first matching fd will be used.

52c239d core/exec: add a named-descriptor option ("fd") for streams (#4179)
man/systemd.exec.xml | 46 +++++++++++++--
src/core/dbus-execute.c | 86 ++++++++++++++++++++++++++-
src/core/execute.c | 86 ++++++++++++++++++++++++---
src/core/execute.h | 5 ++
src/core/load-fragment-gperf.gperf.m4 | 6 +-
src/core/load-fragment.c | 104 +++++++++++++++++++++++++++++++--
src/core/load-fragment.h | 2 +
src/core/unit.c | 20 +++----
8 files changed, 322 insertions(+), 33 deletions(-)

Upstream: github.com


  • Share