From: Lennart Poettering Date: Wed, 26 Mar 2025 15:15:25 +0000 (-0400) Subject: build-path: make invoke_callout_binary() honour $PATH as last resort X-Git-Tag: v258-rc1~924 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2caa462504af4f29a2df6805639b026d901099cd;p=thirdparty%2Fsystemd.git build-path: make invoke_callout_binary() honour $PATH as last resort If we cannot find the callout we need in the build dir let's look for it in $PATH as last resort. This makes invoke_callout_binary() usable for all binaries we install into $PATH (as opposed to /usr/lib/systemd), but has no effect on callout binaries specified with full path. This is useful, since we soon want to invoke journalctl as a callout. --- diff --git a/src/basic/build-path.c b/src/basic/build-path.c index b5972658dfe..4a94fcb7178 100644 --- a/src/basic/build-path.c +++ b/src/basic/build-path.c @@ -241,7 +241,7 @@ int invoke_callout_binary(const char *path, char *const argv[]) { if (find_build_dir_binary(fn, &np) >= 0) execv(np, argv); - execv(path, argv); + execvp(path, argv); return -errno; }