summaryrefslogtreecommitdiff
path: root/src/basic/signal-util.h
Commit message (Collapse)AuthorAgeFilesLines
* signal-util: add common implementation for propagating a signalLennart Poettering2022-11-171-0/+2
| | | | | | | i.e. let's add a common logic to be called from a signal handler to raise the passed signal again. Follow-up for: #25399
* signal-util: add helper pop_pending_signal()Lennart Poettering2021-07-081-0/+3
|
* signal-util: make -1 termination of ignore_signals() argument list unnecessaryLennart Poettering2021-02-251-3/+22
| | | | | | | | | | Clean up ignore_signals() + default_signals() + sigaction_many() a bit: make it unnecessary to explicitly terminate the signal list with -1. Merge all three calls into a single function that is just called with slightly different parameters. And eliminate an unnecessary extra iteration in its inner for() loop. No change in behaviour.
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* signal-util: add new helper signal_is_blocked()Lennart Poettering2019-12-041-0/+2
|
* 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.
* util: rename signal_from_string_try_harder() to signal_from_string()Yu Watanabe2018-05-031-2/+0
| | | | | Also this makes the new `signal_from_string()` function reject e.g, `SIG3` or `SIG+5`.
* 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.
* basic: introduce *_to_string_with_check() functionsYu Watanabe2018-01-021-0/+7
| | | | They are used in later commits.
* signal-util: use a slightly less likely to conflict variable name instead of 't'Lennart Poettering2017-11-201-5/+5
|
* 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.
* tree-wide: add new SIGNAL_VALID() macro-like function that validates signal ↵Lennart Poettering2016-04-121-0/+4
| | | | | | numbers And port all code over to use it.
* basic: mark unused variable as suchThomas Hindoe Paaboel Andersen2016-02-231-4/+4
|
* 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.
* nss: block various signals while running NSS lookupsLennart Poettering2016-01-271-0/+11
| | | | | | | Let's make sure our poll() calls don't get interrupted where they shouldn't (SIGALRM, ...), but allow them to be interrupted where they should (SIGINT, ...). Fixes #1965
* util-lib: split string parsing related calls from util.[ch] into parse-util.[ch]Lennart Poettering2015-10-271-0/+2
|
* everywhere: port everything to sigprocmask_many() and friendsLennart Poettering2015-06-151-1/+1
| | | | | | | | | | | This ports a lot of manual code over to sigprocmask_many() and friends. Also, we now consistly check for sigprocmask() failures with assert_se(), since the call cannot realistically fail unless there's a programming error. Also encloses a few sd_event_add_signal() calls with (void) when we ignore the return values for it knowingly.
* build-sys: split internal basic/ library from shared/Kay Sievers2015-06-111-0/+41
basic/ can be used by everything cannot use anything outside of basic/ libsystemd/ can use basic/ cannot use shared/ shared/ can use libsystemd/