1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

Merge pull request #8408 from keszybz/ln-relative

bugs.fd.o bug archelogy
This commit is contained in:
Yu Watanabe 2018-03-19 18:32:30 +09:00 committed by GitHub
commit bcabcde5d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 64 additions and 14 deletions

View File

@ -692,6 +692,42 @@
that are shown are additionally filtered by <option>--type=</option> and <option>--state=</option> if those that are shown are additionally filtered by <option>--type=</option> and <option>--state=</option> if those
options are specified.</para> options are specified.</para>
<para>Produces output similar to
<programlisting> UNIT LOAD ACTIVE SUB DESCRIPTION
sys-module-fuse.device loaded active plugged /sys/module/fuse
-.mount loaded active mounted Root Mount
boot-efi.mount loaded active mounted /boot/efi
systemd-journald.service loaded active running Journal Service
systemd-logind.service loaded active running Login Service
● user@1000.service loaded active running User Manager for UID 1000
...
systemd-tmpfiles-clean.timer loaded active waiting Daily Cleanup of Temporary Directories
LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
123 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
</programlisting>
The header and the last unit of a given type are underlined if the
terminal supports that. A colored dot is shown next to services which
were masked, not found, or otherwise failed.</para>
<para>The LOAD column shows the load state, one of
<constant>loaded</constant>, <constant>not-found</constant>,
<constant>stub</constant>, <constant>error</constant>,
<constant>merged</constant>, <constant>masked</constant>. The ACTIVE
columns shows the general unit state, one of <constant>active</constant>,
<constant>reloading</constant>, <constant>inactive</constant>,
<constant>failed</constant>, <constant>activating</constant>,
<constant>deactivating</constant>. The SUB column shows the
unit-type-specific detailed state of the unit, possible values vary by
unit type. The list of possible LOAD, ACTIVE, and SUB states is not
constant and new systemd releases may both add and remove values.
<programlisting>systemctl --state=help</programlisting> command maybe be
used to display the current set of possible values.</para>
<para>This is the default command.</para> <para>This is the default command.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>

View File

@ -590,7 +590,7 @@ endforeach
conf.set_quoted('TELINIT', get_option('telinit-path')) conf.set_quoted('TELINIT', get_option('telinit-path'))
if run_command('ln', '--relative', '--help').returncode() != 0 if run_command('ln', '--relative', '--help').returncode() != 0
error('ln does not support --relative') error('ln does not support --relative (added in coreutils 8.16)')
endif endif
############################################################ ############################################################

View File

@ -426,6 +426,8 @@ static int enable_special_signals(Manager *m) {
return 0; return 0;
} }
#define RTSIG_IF_AVAILABLE(signum) (signum <= SIGRTMAX ? signum : -1)
static int manager_setup_signals(Manager *m) { static int manager_setup_signals(Manager *m) {
struct sigaction sa = { struct sigaction sa = {
.sa_handler = SIG_DFL, .sa_handler = SIG_DFL,
@ -479,22 +481,22 @@ static int manager_setup_signals(Manager *m) {
/* .. one free signal here ... */ /* .. one free signal here ... */
#if !defined(__hppa64__) && !defined(__hppa__) /* Apparently Linux on hppa had fewer RT signals until v3.18,
/* Apparently Linux on hppa has fewer RT * SIGRTMAX was SIGRTMIN+25, and then SIGRTMIN was lowered,
* signals (SIGRTMAX is SIGRTMIN+25 there), * see commit v3.17-7614-g1f25df2eff.
* hence let's not try to make use of them *
* here. Since these commands are accessible * We cannot unconditionally make use of those signals here,
* by different means and only really a safety * so let's use a runtime check. Since these commands are
* net, the missing functionality on hppa * accessible by different means and only really a safety
* shouldn't matter. */ * net, the missing functionality on hppa shouldn't matter.
*/
SIGRTMIN+26, /* systemd: set log target to journal-or-kmsg */ RTSIG_IF_AVAILABLE(SIGRTMIN+26), /* systemd: set log target to journal-or-kmsg */
SIGRTMIN+27, /* systemd: set log target to console */ RTSIG_IF_AVAILABLE(SIGRTMIN+27), /* systemd: set log target to console */
SIGRTMIN+28, /* systemd: set log target to kmsg */ RTSIG_IF_AVAILABLE(SIGRTMIN+28), /* systemd: set log target to kmsg */
SIGRTMIN+29, /* systemd: set log target to syslog-or-kmsg (obsolete) */ RTSIG_IF_AVAILABLE(SIGRTMIN+29), /* systemd: set log target to syslog-or-kmsg (obsolete) */
/* ... one free signal here SIGRTMIN+30 ... */ /* ... one free signal here SIGRTMIN+30 ... */
#endif
-1); -1);
assert_se(sigprocmask(SIG_SETMASK, &mask, NULL) == 0); assert_se(sigprocmask(SIG_SETMASK, &mask, NULL) == 0);

View File

@ -21,10 +21,21 @@
#include <signal.h> #include <signal.h>
#include <unistd.h> #include <unistd.h>
#include "log.h"
#include "macro.h" #include "macro.h"
#include "signal-util.h" #include "signal-util.h"
#include "process-util.h" #include "process-util.h"
#define info(sig) log_info(#sig " = " STRINGIFY(sig) " = %d", sig)
static void test_rt_signals(void) {
info(SIGRTMIN);
info(SIGRTMAX);
/* We use signals SIGRTMIN+0 to SIGRTMIN+24 unconditionally */
assert(SIGRTMAX - SIGRTMIN >= 24);
}
static void test_block_signals(void) { static void test_block_signals(void) {
sigset_t ss; sigset_t ss;
@ -62,6 +73,7 @@ static void test_ignore_signals(void) {
} }
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
test_rt_signals();
test_block_signals(); test_block_signals();
test_ignore_signals(); test_ignore_signals();