summaryrefslogtreecommitdiff
path: root/src/core/execute.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/execute.c')
-rw-r--r--src/core/execute.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/execute.c b/src/core/execute.c
index 99a7881f1c..953cfa2baa 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -59,6 +59,7 @@
#include "utmp-wtmp.h"
#include "def.h"
#include "loopback-setup.h"
+#include "path-util.h"
/* This assumes there is a 'tty' group */
#define TTY_MODE 0620
@@ -929,7 +930,7 @@ static void rename_process_from_path(const char *path) {
/* This resulting string must fit in 10 chars (i.e. the length
* of "/sbin/init") to look pretty in /bin/ps */
- p = file_name_from_path(path);
+ p = path_get_file_name(path);
if (isempty(p)) {
rename_process("(...)");
return;
@@ -1152,14 +1153,14 @@ int exec_spawn(ExecCommand *command,
}
if (!keep_stdout) {
- err = setup_output(context, socket_fd, file_name_from_path(command->path), apply_tty_stdin);
+ err = setup_output(context, socket_fd, path_get_file_name(command->path), apply_tty_stdin);
if (err < 0) {
r = EXIT_STDOUT;
goto fail_child;
}
}
- err = setup_error(context, socket_fd, file_name_from_path(command->path), apply_tty_stdin);
+ err = setup_error(context, socket_fd, path_get_file_name(command->path), apply_tty_stdin);
if (err < 0) {
r = EXIT_STDERR;
goto fail_child;