init: add failed to start message

This commit is contained in:
2024-07-16 21:10:52 +02:00
parent fdd5e44092
commit 03d74e2756

View File

@@ -49,9 +49,11 @@ int main() {
} else if (strcmp(line, "tasks") == 0) { } else if (strcmp(line, "tasks") == 0) {
print_tasks(); print_tasks();
} else { } else {
if (fork() == 0) if (fork() == 0) {
execve(line, 0, 0); execve(line, 0, 0);
else printf("Failed to start: %s\n", line);
return 0;
} else
wait(NULL); wait(NULL);
} }
} }