summaryrefslogtreecommitdiffstats
path: root/src/basic/exit-status.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Move various files that don't need to be in basic/ to shared/Zbigniew Jędrzejewski-Szmek2018-11-201-97/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't have much effect on the final build, because we link libbasic.a into libsystemd-shared.so, so in the end, all the object built from basic/ end up in libsystemd-shared. And when the static library is linked into binaries, any objects that are included in it but are not used are trimmed. Hence, the size of output artifacts doesn't change: $ du -sb /var/tmp/inst* 54181861 /var/tmp/inst1 (old) 54207441 /var/tmp/inst1s (old split-usr) 54182477 /var/tmp/inst2 (new) 54208041 /var/tmp/inst2s (new split-usr) (The negligible change in size is because libsystemd-shared.so is bigger by a few hundred bytes. I guess it's because symbols are named differently or something like that.) The effect is on the build process, in particular partial builds. This change effectively moves the requirements on some build steps toward the leaves of the dependency tree. Two effects: - when building items that do not depend on libsystemd-shared, we build less stuff for libbasic.a (which wouldn't be used anyway, so it's a net win). - when building items that do depend on libshared, we reduce libbasic.a as a synchronization point, possibly allowing better parallelism. Method: 1. copy list of .h files from src/basic/meson.build to /tmp/basic 2. $ for i in $(grep '.h$' /tmp/basic); do echo $i; git --no-pager grep "include \"$i\"" src/basic/ 'src/lib*' 'src/nss-*' 'src/journal/sd-journal.c' |grep -v "${i%.h}.c";echo ;done | less
* tree-wide: remove Lennart's copyright linesLennart Poettering2018-06-141-4/+0
| | | | | | | | | | | These lines are generally out-of-date, incomplete and unnecessary. With SPDX and git repository much more accurate and fine grained information about licensing and authorship is available, hence let's drop the per-file copyright notice. Of course, removing copyright lines of others is problematic, hence this commit only removes my own lines and leaves all others untouched. It might be nicer if sooner or later those could go away too, making git the only and accurate source of authorship information.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-06-141-2/+0
| | | | | | | | | | | | | | | | This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
* exit-status: list BSD exit codes tooLennart Poettering2018-04-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's optionally translate BSD exit codes to error strings too. My first approach on adding this was to turn ExitStatusLevel into a bitmask rather than a linear level, with one bit for the various feature bits. However, the exit code ranges are generally not defined independently from each other, i.e. our own ones are defined with the LSB ones in mind, and most sets are defined with the ISO C ones. Hence, instead I changed the existing hierarchy of MINIMAL, SYSTEMD, LSB with an alias of FULL == LSB, only slightly by seperating FULL and LSB into two separate levels, so that there's now: 1. MINIMAL (only EXIT_SUCCESS/EXIT_FAILURE) 2. SYSTEMD (incorporating our own exit codes) 3. LSB (like SYSTEMD but adding in LSB service exit codes) 4. FULL (like FULL but adding BSD exit codes) Note that across the codebase only FULL, SYSTEMD, and MINIMAL are used, depending on context, how much we know about the process and whether we are logging for debugging purposes or not. This means the LSB level wouldn't really have to be separate, but it appeared careless to me to fold it into FULL along with the BSD exit codes. Note that this commit doesn't change much for regular codepaths: the FULL exit status level is only used during debug logging, as a helper to the user reading the debug logs.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* Add SPDX license identifiers to source files under the LGPLZbigniew Jędrzejewski-Szmek2017-11-191-0/+1
| | | | | This follows what the kernel is doing, c.f. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460.
* exit-status: drop EXIT_MAKE_STARTERLennart Poettering2017-09-151-1/+1
| | | | This is unused since kdbus has been removed.
* core: add {State,Cache,Log,Configuration}Directory= (#6384)Yu Watanabe2017-07-181-0/+4
| | | | | | | | This introduces {State,Cache,Log,Configuration}Directory= those are similar to RuntimeDirectory=. They create the directories under /var/lib, /var/cache/, /var/log, or /etc, respectively, with the mode specified in {State,Cache,Log,Configuration}DirectoryMode=. This also fixes #6391.
* core: run each system service with a fresh session keyringLennart Poettering2016-12-131-0/+1
| | | | | | | | | | | | | | | | | This patch ensures that each system service gets its own session kernel keyring automatically, and implicitly. Without this a keyring is allocated for it on-demand, but is then linked with the user's kernel keyring, which is OK behaviour for logged in users, but not so much for system services. With this change each service gets a session keyring that is specific to the service and ceases to exist when the service is shut down. The session keyring is not linked up with the user keyring and keys hence only search within the session boundaries by default. (This is useful in a later commit to store per-service material in the keyring, for example the invocation ID) (With input from David Howells)
* core: when determining whether a process exit status is clean, consider ↵Lennart Poettering2016-10-101-1/+6
| | | | | | | | | | | | | | whether it is a command or a daemon SIGTERM should be considered a clean exit code for daemons (i.e. long-running processes, as a daemon without SIGTERM handler may be shut down without issues via SIGTERM still) while it should not be considered a clean exit code for commands (i.e. short-running processes). Let's add two different clean checking modes for this, and use the right one at the appropriate places. Fixes: #4275
* exit-status: kill is_clean_exit_lsb(), move logic to sysv-generatorLennart Poettering2016-10-101-1/+0
| | | | | | | | | | | | Let's get rid of is_clean_exit_lsb(), let's move the logic for the special handling of the two LSB exit codes into the sysv-generator by writing out appropriate SuccessExitStatus= lines if the LSB header exists. This is not only semantically more correct, bug also fixes a bug as the code in service.c that chose between is_clean_exit_lsb() and is_clean_exit() based this check on whether a native unit files was available for the unit. However, that check was bogus since a long time, since the SysV generator was introduced and native SysV script support was removed from PID 1, as in that case a unit file always existed.
* exit-status: remove ExitStatus typedefLennart Poettering2016-10-101-3/+3
| | | | | | | | | Do not make up our own type for ExitStatus, but use the type used by POSIX for this, which is "int". In particular as we never used that type outside of the definition of exit_status_to_string() where we internally cast the paramter to (int) every single time we used it. Hence, let's simplify things, drop the type and use the kernel type directly.
* exit-status: update comments a bitLennart Poettering2016-06-061-6/+10
|
* Remove kdbus custom endpoint supportDaniel Mack2016-02-111-1/+0
| | | | | | This feature will not be used anytime soon, so remove a bit of cruft. The BusPolicy= config directive will stay around as compat noop.
* tree-wide: remove Emacs lines from all filesDaniel Mack2016-02-101-2/+0
| | | | | This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
* basic: re-sort includesThomas Hindoe Paaboel Andersen2015-12-011-1/+1
| | | | | My previous patch to only include what we use accidentially placed the added inlcudes in non-sorted order.
* basic: include only what we useThomas Hindoe Paaboel Andersen2015-11-301-0/+2
| | | | | This is a cleaned up result of running iwyu but without forward declarations on src/basic.
* build-sys: split internal basic/ library from shared/Kay Sievers2015-06-111-0/+103
basic/ can be used by everything cannot use anything outside of basic/ libsystemd/ can use basic/ cannot use shared/ shared/ can use libsystemd/