]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: add support for StandardInputFile= and friends
authorLennart Poettering <lennart@poettering.net>
Fri, 27 Oct 2017 14:09:57 +0000 (16:09 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 17 Nov 2017 10:13:44 +0000 (11:13 +0100)
commit2038c3f58486ea5da1a2fbf2fdb898f9fd6f8cae
tree71b68c25f17a129f9e419e80120a0d6185f51828
parent0664775c846f4ff1b53ee6e93d5a1aef68912dad
core: add support for StandardInputFile= and friends

These new settings permit specifiying arbitrary paths as
stdin/stdout/stderr locations. We try to open/create them as necessary.
Some special magic is applied:

1) if the same path is specified for both input and output/stderr, we'll
   open it only once O_RDWR, and duplicate them fd instead.

2) If we an AF_UNIX socket path is specified, we'll connect() to it,
   rather than open() it. This allows invoking systemd services with
   stdin/stdout/stderr connected to arbitrary foreign service sockets.

Fixes: #3991
src/core/dbus-execute.c
src/core/execute.c
src/core/execute.h
src/core/load-fragment.c
src/shared/bus-unit-util.c