anonymous man makes program better

This commit is contained in:
Emil Williams 2024-02-26 23:43:34 +00:00
parent ad135f7500
commit a5aa6c466a

2
bake.c
View File

@ -306,7 +306,7 @@ run(char * buf) {
fputs(GREEN "output" RESET ":\n", stderr); fputs(GREEN "output" RESET ":\n", stderr);
pid_t pid = fork(); pid_t pid = fork();
if (!pid) { if (!pid) {
execl("/bin/sh", "-c", "'ls bake.c'", NULL); execl("/bin/sh", "sh", "-c", buf, NULL);
} else { } else {
int status; int status;
waitpid(pid, &status, 0); waitpid(pid, &status, 0);