]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: add EnqueueMarkedJobs method to reload/restart marked units
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 30 Jan 2021 18:44:15 +0000 (19:44 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 15 Feb 2021 19:49:14 +0000 (20:49 +0100)
commit70666e28a1affe241a9c4a6fb26aecdf7ce5d167
tree5bb61031c25ac92554755139c4acb121adf38a94
parent0dd3c0907f42774dccd79658d744a5a75c72ef58
core: add EnqueueMarkedJobs method to reload/restart marked units

We support two return types for methods that start jobs. EnqueueJob support the
full-monty mode with affected jobs. I didn't do this here, since it seems
unlikely to be used. In the common case there'd be a huge list of jobs and
affected jobs. EnqueueMarkedJobs() just returns a list of jobs that we can wait
upon.

The name of the method is generic in case we decide to add something other than
just reload/restart later on.

When errors occur, resource errors are treated as fatal, but for other error
types we queue up other jobs, and only return an error at the end. The
assumption is that the caller will ignore the result error anyway, so it's
better to try to reload/restart as much as possible.
man/org.freedesktop.systemd1.xml
src/core/dbus-manager.c
src/core/dbus-unit.c
src/core/dbus-unit.h