Skip to content
This repository has been archived by the owner on Sep 23, 2021. It is now read-only.

Commit

Permalink
use hardcoded /bin/sh as a shell instead of relying on PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
dexterlb committed Feb 9, 2021
1 parent a9f968d commit 7200a41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ void run_command(const char* cmd) {
} else if (cmdpid > 0) {
wait(NULL);
} else {
execlp("sh", "sh", "-c", cmd, NULL);
execl("/bin/sh", "sh", "-c", cmd, NULL);
error(EXIT_FAILURE, errno, "exec");
}
}
Expand Down

0 comments on commit 7200a41

Please sign in to comment.