summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-03-22 15:44:07 +0100
committerJo-Philipp Wich <jo@mein.io>2021-03-22 15:44:07 +0100
commit7a41fb3cbb13b2d885f178c95e0d1606e6a1c7d6 (patch)
treeff212317106f2b2e779bf9cd012f545eee9ff47a
parent4a5b9010ccc56fdf288fe758023af445feb93fad (diff)
lib: use execvp() in system()
Use execvp() instead of execv() to lookup the specified executable in $PATH. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index 54eb710..8150ec6 100644
--- a/lib.c
+++ b/lib.c
@@ -2260,7 +2260,7 @@ uc_system(uc_vm *vm, size_t nargs)
goto fail;
case 0:
- execv(arglist[0], (char * const *)arglist);
+ execvp(arglist[0], (char * const *)arglist);
exit(-1);
break;