Systemd/src/core
Lennart Poettering 6c12b52e19 core: add new "scope" unit type for making a unit of pre-existing processes
"Scope" units are very much like service units, however with the
difference that they are created from pre-existing processes, rather
than processes that systemd itself forks off. This means they are
generated programmatically via the bus API as transient units rather
than from static configuration read from disk. Also, they do not provide
execution-time parameters, as at the time systemd adds the processes to
the scope unit they already exist and the parameters cannot be applied
anymore.

The primary benefit of this new unit type is to create arbitrary cgroups
for worker-processes forked off an existing service.

This commit also adds a a new mode to "systemd-run" to run the specified
processes in a scope rather then a transient service.
2013-07-01 00:18:00 +02:00
..
.gitignore execute: support syscall filtering using seccomp filters 2012-07-17 04:17:53 +02:00
audit-fd.c selinux: remove anything PID1-specific from selinux-access.[ch] so that we can reuse it in logind 2012-10-02 17:56:54 -04:00
audit-fd.h audit: turn the audit fd into a static variable 2012-10-02 17:40:09 -04:00
automount.c unit: rework stop pending logic 2013-04-25 22:01:49 -03:00
automount.h Add __attribute__((const, pure, format)) in various places 2013-05-02 22:52:09 -04:00
build.h journal: make libgcrypt dependency optional 2012-08-20 16:51:46 +02:00
bus-errors.h Move bus_error to dbus-common and remove bus_error_message_or_strerror 2013-04-18 02:54:58 +02:00
cgroup.c cgroup: implicitly add units to GC queue when their cgroups run empty 2013-07-01 00:17:59 +02:00
cgroup.h cgroup: readd proper cgroup empty tracking 2013-07-01 00:17:59 +02:00
condition.c core: use the same test as upstart for apparmor 2013-05-30 00:43:39 -04:00
condition.h Add __attribute__((const, pure, format)) in various places 2013-05-02 22:52:09 -04:00
dbus-automount.c selinux: rework selinux access check logic 2012-10-02 17:07:00 -04:00
dbus-automount.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
dbus-cgroup.c core: add transient units 2013-06-28 04:12:58 +02:00
dbus-cgroup.h dbus: expose cgroup properties in introspection everywhere 2013-07-01 00:18:00 +02:00
dbus-device.c selinux: rework selinux access check logic 2012-10-02 17:07:00 -04:00
dbus-device.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
dbus-execute.c core: general cgroup rework 2013-06-27 04:17:34 +02:00
dbus-execute.h core: general cgroup rework 2013-06-27 04:17:34 +02:00
dbus-job.c dbus: fix minor memory leak when sending job change signals 2013-06-28 03:47:40 +02:00
dbus-job.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
dbus-kill.c unit: split off KillContext from ExecContext containing only kill definitions 2012-07-20 00:10:31 +02:00
dbus-kill.h unit: split off KillContext from ExecContext containing only kill definitions 2012-07-20 00:10:31 +02:00
dbus-manager.c core: add transient units 2013-06-28 04:12:58 +02:00
dbus-manager.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
dbus-mount.c dbus: expose cgroup properties in introspection everywhere 2013-07-01 00:18:00 +02:00
dbus-mount.h dbus: hookup runtime property changes for mouns, services, sockets, swaps too 2013-06-27 23:21:21 +02:00
dbus-path.c unit: rework trigger dependency logic 2013-04-23 16:00:32 -03:00
dbus-path.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
dbus-scope.c core: add new "scope" unit type for making a unit of pre-existing processes 2013-07-01 00:18:00 +02:00
dbus-scope.h core: add new "scope" unit type for making a unit of pre-existing processes 2013-07-01 00:18:00 +02:00
dbus-service.c dbus: expose cgroup properties in introspection everywhere 2013-07-01 00:18:00 +02:00
dbus-service.h dbus: hookup runtime property changes for mouns, services, sockets, swaps too 2013-06-27 23:21:21 +02:00
dbus-slice.c dbus: expose cgroup properties in introspection everywhere 2013-07-01 00:18:00 +02:00
dbus-slice.h dbus: add infrastructure for changing multiple properties at once on units and hook some cgroup attributes up to it 2013-06-27 21:14:56 +02:00
dbus-snapshot.c Use bus_maybe_send_reply() where applicable 2013-03-18 19:59:32 -04:00
dbus-snapshot.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
dbus-socket.c dbus: expose cgroup properties in introspection everywhere 2013-07-01 00:18:00 +02:00
dbus-socket.h dbus: hookup runtime property changes for mouns, services, sockets, swaps too 2013-06-27 23:21:21 +02:00
dbus-swap.c dbus: expose cgroup properties in introspection everywhere 2013-07-01 00:18:00 +02:00
dbus-swap.h dbus: hookup runtime property changes for mouns, services, sockets, swaps too 2013-06-27 23:21:21 +02:00
dbus-target.c selinux: rework selinux access check logic 2012-10-02 17:07:00 -04:00
dbus-target.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
dbus-timer.c unit: rework trigger dependency logic 2013-04-23 16:00:32 -03:00
dbus-timer.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
dbus-unit.c core: add transient units 2013-06-28 04:12:58 +02:00
dbus-unit.h core: add transient units 2013-06-28 04:12:58 +02:00
dbus.c core: general cgroup rework 2013-06-27 04:17:34 +02:00
dbus.h manager: extend performance measurement interface to include firmware/loader times 2012-09-13 18:54:32 +02:00
device.c core: escape unit name from udev 2013-05-06 23:10:44 +02:00
device.h Add __attribute__((const, pure, format)) in various places 2013-05-02 22:52:09 -04:00
execute.c core: general cgroup rework 2013-06-27 04:17:34 +02:00
execute.h core: general cgroup rework 2013-06-27 04:17:34 +02:00
hostname-setup.c hostname: only suppress setting of pretty hostname if it is non-equal to the static hostname and if the static hostname is set, too 2013-05-07 20:56:41 +02:00
hostname-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
ima-setup.c core: move mount_setup_early() to main.c 2013-03-07 20:53:14 +01:00
ima-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
initreq.h move libsystemd_core.la sources into core/ 2012-04-11 16:03:51 +02:00
job.c core: add transient units 2013-06-28 04:12:58 +02:00
job.h Add __attribute__((const, pure, format)) in various places 2013-05-02 22:52:09 -04:00
kill.c unit: split off KillContext from ExecContext containing only kill definitions 2012-07-20 00:10:31 +02:00
kill.h Add __attribute__((const, pure, format)) in various places 2013-05-02 22:52:09 -04:00
killall.c killall: do not use alloca() in argument list 2013-06-26 19:52:00 -04:00
killall.h switch-root: don't wait for processes 2012-07-17 17:44:26 +02:00
kmod-setup.c kmod-setup: properly iterate through module table 2013-05-07 17:52:23 +02:00
kmod-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
load-dropin.c id128: when taking user input for a 128bit ID, validate syntax 2013-04-30 08:36:01 -03:00
load-dropin.h Introspect and monitor dropin configuration 2013-04-01 23:43:49 -04:00
load-fragment-gperf.gperf.m4 core: general cgroup rework 2013-06-27 04:17:34 +02:00
load-fragment.c core: add transient units 2013-06-28 04:12:58 +02:00
load-fragment.h core: general cgroup rework 2013-06-27 04:17:34 +02:00
locale-setup.c Use initalization instead of explicit zeroing 2013-04-05 19:50:57 -04:00
locale-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
loopback-setup.c move _cleanup_ attribute in front of the type 2013-04-18 09:11:22 +02:00
loopback-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
machine-id-setup.c id128: when taking user input for a 128bit ID, validate syntax 2013-04-30 08:36:01 -03:00
machine-id-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
macros.systemd.in rpm: define a %_userunitdir macro 2013-06-17 18:37:25 +02:00
main.c main: fix loading of default target 2013-06-28 18:37:15 +02:00
Makefile build-sys: add stub makefiles to make emacs easier to use 2012-04-12 13:35:56 +02:00
manager.c core: add transient units 2013-06-28 04:12:58 +02:00
manager.h core: general cgroup rework 2013-06-27 04:17:34 +02:00
mount-setup.c Small cleanup 2013-04-24 00:25:04 -04:00
mount-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
mount.c core: add transient units 2013-06-28 04:12:58 +02:00
mount.h core: general cgroup rework 2013-06-27 04:17:34 +02:00
namespace.c core: remove unnecessary goto in setup_namespace 2013-03-20 19:16:01 -04:00
namespace.h core: Remove unnecessary typedef 2013-04-17 18:27:46 +02:00
org.freedesktop.systemd1.conf systemctl: add commands set-default and get-default 2013-05-30 20:44:41 -04:00
org.freedesktop.systemd1.policy.in.in move more main systemd parts to core/ 2012-04-12 14:24:40 +02:00
org.freedesktop.systemd1.service move more main systemd parts to core/ 2012-04-12 14:24:40 +02:00
path.c Add __attribute__((const, pure, format)) in various places 2013-05-02 22:52:09 -04:00
path.h Add __attribute__((const, pure, format)) in various places 2013-05-02 22:52:09 -04:00
scope.c core: add new "scope" unit type for making a unit of pre-existing processes 2013-07-01 00:18:00 +02:00
scope.h core: add new "scope" unit type for making a unit of pre-existing processes 2013-07-01 00:18:00 +02:00
securebits.h move libsystemd_core.la sources into core/ 2012-04-11 16:03:51 +02:00
selinux-access.c Add __attribute__((const, pure, format)) in various places 2013-05-02 22:52:09 -04:00
selinux-access.h selinux: remove anything PID1-specific from selinux-access.[ch] so that we can reuse it in logind 2012-10-02 17:56:54 -04:00
selinux-setup.c util: make time formatting a bit smarter 2013-04-04 02:56:56 +02:00
selinux-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
service.c core: add new "scope" unit type for making a unit of pre-existing processes 2013-07-01 00:18:00 +02:00
service.h core: general cgroup rework 2013-06-27 04:17:34 +02:00
shutdown.c shutdown: print a nice message before returning to initrd 2013-04-09 18:29:33 +02:00
slice.c core: add new "scope" unit type for making a unit of pre-existing processes 2013-07-01 00:18:00 +02:00
slice.h core: general cgroup rework 2013-06-27 04:17:34 +02:00
smack-setup.c Make it possible to disable smack separately from xattr support 2013-05-17 09:58:28 -07:00
smack-setup.h core: mount and initialize Smack 2013-03-07 20:53:14 +01:00
snapshot.c snapshot: snapshots are just a special kind of transient units now 2013-07-01 00:18:00 +02:00
snapshot.h snapshot: snapshots are just a special kind of transient units now 2013-07-01 00:18:00 +02:00
socket.c dbus: hookup runtime property changes for mouns, services, sockets, swaps too 2013-06-27 23:21:21 +02:00
socket.h core: general cgroup rework 2013-06-27 04:17:34 +02:00
special.h core: general cgroup rework 2013-06-27 04:17:34 +02:00
swap.c dbus: hookup runtime property changes for mouns, services, sockets, swaps too 2013-06-27 23:21:21 +02:00
swap.h core: general cgroup rework 2013-06-27 04:17:34 +02:00
switch-root.c switch-root: try pivot_root() before overmounting / 2012-11-16 18:21:09 +01:00
switch-root.h switch-root: move switch_root() call into its own .c file 2012-05-21 19:33:39 +02:00
sync.c shutdown: issue a sync() as soon as shutdown.target is queued 2013-02-09 02:20:42 +01:00
sync.h shutdown: issue a sync() as soon as shutdown.target is queued 2013-02-09 02:20:42 +01:00
syscall-list.c Make two functions static 2013-03-20 19:16:01 -04:00
syscall-list.h Fix spelling errors using 'codespell' tool 2013-04-15 08:40:05 -04:00
sysfs-show.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
system.conf manager: add DefaultEnvironment option 2013-06-20 16:27:45 -04:00
systemd.pc.in rpm: expose preset dir as rpm macro and in systemd.pc 2012-09-13 22:17:46 +02:00
target.c Add __attribute__((const, pure, format)) in various places 2013-05-02 22:52:09 -04:00
target.h Add __attribute__((const, pure, format)) in various places 2013-05-02 22:52:09 -04:00
tcpwrap.c relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
tcpwrap.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
timer.c Add __attribute__((const, pure, format)) in various places 2013-05-02 22:52:09 -04:00
timer.h Add __attribute__((const, pure, format)) in various places 2013-05-02 22:52:09 -04:00
transaction.c core: add transient units 2013-06-28 04:12:58 +02:00
transaction.h core, systemctl: add support for irreversible jobs 2013-02-22 16:06:17 +01:00
umount.c move _cleanup_ attribute in front of the type 2013-04-18 09:11:22 +02:00
umount.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
unit-printf.c logind: add infrastructure to keep track of machines, and move to slices 2013-06-20 03:49:59 +02:00
unit-printf.h unit: split unit_printf() and friends into its own .c file 2012-09-18 11:27:56 +02:00
unit.c core: add new "scope" unit type for making a unit of pre-existing processes 2013-07-01 00:18:00 +02:00
unit.h core: add new "scope" unit type for making a unit of pre-existing processes 2013-07-01 00:18:00 +02:00
user.conf man: rename systemd.conf to systemd-system.conf 2013-02-13 09:48:32 -05:00