From 8f4ec81ec5d944f797801603e60cf890febafc09 Mon Sep 17 00:00:00 2001 From: i-ky Date: Sat, 27 Aug 2022 13:08:58 +0000 Subject: [PATCH] Use a more suitable function from exec() family --- src/basset.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/basset.cpp b/src/basset.cpp index 1814867..358ab06 100644 --- a/src/basset.cpp +++ b/src/basset.cpp @@ -8,7 +8,7 @@ using std::cerr; -int main(int argc, char *argv[], char *envp[]) { +int main(int argc, char *argv[]) { argv++; if (auto pid = fork()) { @@ -46,7 +46,7 @@ int main(int argc, char *argv[], char *envp[]) { return -1; } - execve(*argv, argv, envp); + execvp(*argv, argv); // on success, execve() does not return perror("cannot execve()"); return -1;