diff options
author | Matthias Klumpp <matthias@tenstral.net> | 2018-09-09 03:18:45 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-02-18 16:16:02 +0100 |
commit | 4b05f0c9d9f6df4e0dab518f8e1ae537bf948f92 (patch) | |
tree | cf8d18410cd148191d951b8f7e60006590011166 /src/sleep | |
parent | bde06abd4f3febc149bf137ca68e4abaa2975b4d (diff) | |
download | systemd-4b05f0c9d9f6df4e0dab518f8e1ae537bf948f92.tar.gz |
core: Allow to configure execute_directories execution behavior
This adds a new bitfield to `execute_directories()` which allows to
configure whether to ignore non-zero exit statuses of binaries run and
whether to allow parallel execution of commands.
In case errors are not ignored, the exit status of the failed script
will now be returned for error reposrting purposes or other further
future use.
Diffstat (limited to 'src/sleep')
-rw-r--r-- | src/sleep/sleep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c index 5b7984a6f2..4a7ffbd979 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c @@ -166,7 +166,7 @@ static int execute(char **modes, char **states) { return log_error_errno(r, "Failed to write mode to /sys/power/disk: %m");; } - execute_directories(dirs, DEFAULT_TIMEOUT_USEC, NULL, NULL, arguments, NULL); + execute_directories(dirs, DEFAULT_TIMEOUT_USEC, NULL, NULL, arguments, NULL, EXEC_DIR_PARALLEL | EXEC_DIR_IGNORE_ERRORS); log_struct(LOG_INFO, "MESSAGE_ID=" SD_MESSAGE_SLEEP_START_STR, @@ -186,7 +186,7 @@ static int execute(char **modes, char **states) { "SLEEP=%s", arg_verb); arguments[1] = (char*) "post"; - execute_directories(dirs, DEFAULT_TIMEOUT_USEC, NULL, NULL, arguments, NULL); + execute_directories(dirs, DEFAULT_TIMEOUT_USEC, NULL, NULL, arguments, NULL, EXEC_DIR_PARALLEL | EXEC_DIR_IGNORE_ERRORS); return r; } |