diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-02-03 20:32:06 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-02-03 23:58:24 +0100 |
commit | 7732f92bad5f24a4bd03bb357af46da56b0ac94d (patch) | |
tree | 10e33a8ec564376365e05a0f12681a73aab40986 /src/nspawn/nspawn-stub-pid1.h | |
parent | 021dd87bc055a5bfb2dcef83fc868fe24648b959 (diff) |
nspawn: optionally run a stub init process as PID 1
This adds a new switch --as-pid2, which allows running commands as PID 2, while a stub init process is run as PID 1.
This is useful in order to run arbitrary commands in a container, as PID1's semantics are different from all other
processes regarding reaping of unknown children or signal handling.
Diffstat (limited to 'src/nspawn/nspawn-stub-pid1.h')
-rw-r--r-- | src/nspawn/nspawn-stub-pid1.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/nspawn/nspawn-stub-pid1.h b/src/nspawn/nspawn-stub-pid1.h new file mode 100644 index 0000000000..36c1aaf5dd --- /dev/null +++ b/src/nspawn/nspawn-stub-pid1.h @@ -0,0 +1,22 @@ +#pragma once + +/*** + This file is part of systemd. + + Copyright 2016 Lennart Poettering + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + systemd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with systemd; If not, see <http://www.gnu.org/licenses/>. +***/ + +int stub_pid1(void); |