projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
615aaf4
)
exec: also evaluate working_directory_missing_ok when not applying chroots
author
Lennart Poettering
<lennart@poettering.net>
Thu, 12 Feb 2015 17:58:43 +0000
(18:58 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 12 Feb 2015 17:58:43 +0000
(18:58 +0100)
src/core/execute.c
patch
|
blob
|
history
diff --git
a/src/core/execute.c
b/src/core/execute.c
index
1f6072c
..
340b800
100644
(file)
--- a/
src/core/execute.c
+++ b/
src/core/execute.c
@@
-1626,13
+1626,14
@@
static int exec_child(
_cleanup_free_ char *d = NULL;
if (asprintf(&d, "%s/%s",
- context->root_directory ?
context->root_directory
: "",
- context->working_directory ?
context->working_directory
: "") < 0) {
+ context->root_directory ?: "",
+ context->working_directory ?: "") < 0) {
*exit_status = EXIT_MEMORY;
return -ENOMEM;
}
- if (chdir(d) < 0) {
+ if (chdir(d) < 0 &&
+ !context->working_directory_missing_ok) {
*exit_status = EXIT_CHDIR;
return -errno;
}