Skip to content

Commit

Permalink
Use a more suitable function from exec() family
Browse files Browse the repository at this point in the history
  • Loading branch information
i-ky committed Aug 27, 2022
1 parent a924159 commit 8f4ec81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/basset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 8f4ec81

Please sign in to comment.