1
0
Fork 0
forked from suyu/suyu

Use execlp instead of execl to avoid failure

This commit is contained in:
Marco Rubin 2022-12-18 14:03:26 +00:00 committed by GitHub
parent fd1ea0fd84
commit 56b0f979eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -186,7 +186,7 @@ pid_t SpawnChild(const char* arg0) {
return pid;
} else if (pid == 0) {
// child
execl(arg0, arg0, nullptr);
execlp(arg0, arg0, nullptr);
const int err = errno;
fmt::print(stderr, "execl failed with error {}\n", err);
_exit(0);