diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-03-19 18:32:30 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-19 18:32:30 +0900 |
commit | bcabcde5d2544ce7e3234652562dcbdfc4cf3494 (patch) | |
tree | 0de1682c6fb7932c5d389bce917358997df8e927 /src/core | |
parent | ac9cea5ba30acbf17fd431a4a4092c4dbee23593 (diff) | |
parent | 6fdbb3c8218ed6a5a2b510508afab9653a330878 (diff) | |
download | systemd-bcabcde5d2544ce7e3234652562dcbdfc4cf3494.tar.gz |
Merge pull request #8408 from keszybz/ln-relative
bugs.fd.o bug archelogy
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/manager.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/core/manager.c b/src/core/manager.c index 9d2e5446cf..33a708adf8 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -426,6 +426,8 @@ static int enable_special_signals(Manager *m) { return 0; } +#define RTSIG_IF_AVAILABLE(signum) (signum <= SIGRTMAX ? signum : -1) + static int manager_setup_signals(Manager *m) { struct sigaction sa = { .sa_handler = SIG_DFL, @@ -479,22 +481,22 @@ static int manager_setup_signals(Manager *m) { /* .. one free signal here ... */ -#if !defined(__hppa64__) && !defined(__hppa__) - /* Apparently Linux on hppa has fewer RT - * signals (SIGRTMAX is SIGRTMIN+25 there), - * hence let's not try to make use of them - * here. Since these commands are accessible - * by different means and only really a safety - * net, the missing functionality on hppa - * shouldn't matter. */ - - SIGRTMIN+26, /* systemd: set log target to journal-or-kmsg */ - SIGRTMIN+27, /* systemd: set log target to console */ - SIGRTMIN+28, /* systemd: set log target to kmsg */ - SIGRTMIN+29, /* systemd: set log target to syslog-or-kmsg (obsolete) */ + /* Apparently Linux on hppa had fewer RT signals until v3.18, + * SIGRTMAX was SIGRTMIN+25, and then SIGRTMIN was lowered, + * see commit v3.17-7614-g1f25df2eff. + * + * We cannot unconditionally make use of those signals here, + * so let's use a runtime check. Since these commands are + * accessible by different means and only really a safety + * net, the missing functionality on hppa shouldn't matter. + */ + + RTSIG_IF_AVAILABLE(SIGRTMIN+26), /* systemd: set log target to journal-or-kmsg */ + RTSIG_IF_AVAILABLE(SIGRTMIN+27), /* systemd: set log target to console */ + RTSIG_IF_AVAILABLE(SIGRTMIN+28), /* systemd: set log target to kmsg */ + RTSIG_IF_AVAILABLE(SIGRTMIN+29), /* systemd: set log target to syslog-or-kmsg (obsolete) */ /* ... one free signal here SIGRTMIN+30 ... */ -#endif -1); assert_se(sigprocmask(SIG_SETMASK, &mask, NULL) == 0); |