On 20.09.19 19:00, Philippe Gerum wrote:
Prefer execlp() over execl() for bootstrapping a new image: callers
may assume that PATH should be considered when searching for the
executable file, e.g. posix_fork test.

Signed-off-by: Philippe Gerum <r...@xenomai.org>
---
  lib/smokey/helpers.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/smokey/helpers.c b/lib/smokey/helpers.c
index 6ee69ec5b..da84c863c 100644
--- a/lib/smokey/helpers.c
+++ b/lib/smokey/helpers.c
@@ -276,7 +276,7 @@ int smokey_fork_exec(const char *path, const char *arg)
        case -1:
                error(1, errno, "fork/vfork");
        case 0:
-               execl(path, arg, NULL);
+               execlp(path, arg, NULL);
                error(1, errno, "execl %s", path);
        default:
                waitpid(pid, &wstatus, 0);


Both applied, thanks.

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

Reply via email to