Systemd/src/nspawn
Lennart Poettering 4c253ed1ca tree-wide: introduce new safe_fork() helper and port everything over
This adds a new safe_fork() wrapper around fork() and makes use of it
everywhere. The new wrapper does a couple of things we previously did
manually and separately in a safer, more correct and automatic way:

1. Optionally resets signal handlers/mask in the child

2. Sets a name on all processes we fork off right after forking off (and
   the patch assigns useful names for all processes we fork off now,
   following a systematic naming scheme: always enclosed in () – in order
   to indicate that these are not proper, exec()ed processes, but only
   forked off children, and if the process is long-running with only our
   own code, without execve()'ing something else, it gets am "sd-" prefix.)

3. Optionally closes all file descriptors in the child

4. Optionally sets a PR_SET_DEATHSIG to SIGTERM in the child, in a safe
   way so that the parent dying before this happens being handled
   safely.

5. Optionally reopens the logs

6. Optionally connects stdin/stdout/stderr to /dev/null

7. Debug logs about the forked off processes.
2017-12-25 11:48:21 +01:00
..
meson.build Add license headers and SPDX identifiers to meson.build files 2017-11-19 19:08:15 +01:00
nspawn-cgroup.c nspawn: when in hybrid mode, chown() both the legacy and the unified hierarchy to the root in the container 2017-12-05 13:49:13 +01:00
nspawn-cgroup.h nspawn: when in hybrid mode, chown() both the legacy and the unified hierarchy to the root in the container 2017-12-05 13:49:13 +01:00
nspawn-def.h build-sys: make the dynamic UID range, and the container UID range configurable 2017-12-06 12:55:37 +01:00
nspawn-expose-ports.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
nspawn-expose-ports.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
nspawn-gperf.gperf tree-wide: adjust fall through comments so that gcc is happy 2017-11-20 13:06:25 -08:00
nspawn-mount.c Add mkdir_errno_wrapper() and use instead of mkdir() in various places 2017-12-16 13:28:22 +01:00
nspawn-mount.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
nspawn-network.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
nspawn-network.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
nspawn-patch-uid.c tree-wide: make use of new STRLEN() macro everywhere (#7639) 2017-12-14 19:02:29 +01:00
nspawn-patch-uid.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
nspawn-register.c bus-unit-util: add socket unit related options 2017-12-23 18:48:16 +09:00
nspawn-register.h nspawn: make use of the RequestStop logic of scope units 2017-11-23 21:47:48 +01:00
nspawn-seccomp.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
nspawn-seccomp.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
nspawn-settings.c Replace free and reassignment with free_and_replace 2017-11-24 10:33:41 +00:00
nspawn-settings.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
nspawn-setuid.c tree-wide: introduce new safe_fork() helper and port everything over 2017-12-25 11:48:21 +01:00
nspawn-setuid.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
nspawn-stub-pid1.c tree-wide: introduce new safe_fork() helper and port everything over 2017-12-25 11:48:21 +01:00
nspawn-stub-pid1.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
nspawn.c Add mkdir_errno_wrapper() and use instead of mkdir() in various places 2017-12-16 13:28:22 +01:00
test-patch-uid.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00