myshellin/doc/code/builtins.txt

10 lines
183 B
Plaintext

void run_builtin(StringArray *args) {
if (strcmp(args->array[0], "exit") == 0) {
exit_shell(args);
}
}
void exit_shell(StringArray *args) {
exit(EXIT_SUCCESS);
}