wip
This commit is contained in:
8
msh.c
8
msh.c
@@ -41,7 +41,11 @@ int (*builtinFunc[]) (char **) = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
int builtinExit(char **args) {
|
int builtinExit(char **args) {
|
||||||
|
#if RL_READLINE_VERSION < 0x0602
|
||||||
rl_clear_history();
|
rl_clear_history();
|
||||||
|
#else
|
||||||
|
clear_history();
|
||||||
|
#endif
|
||||||
free(args);
|
free(args);
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
@@ -365,6 +369,10 @@ int main() {
|
|||||||
initShell();
|
initShell();
|
||||||
signal(SIGINT, handleBreak);
|
signal(SIGINT, handleBreak);
|
||||||
startShell();
|
startShell();
|
||||||
|
#if RL_READLINE_VERSION < 0x0602
|
||||||
rl_clear_history();
|
rl_clear_history();
|
||||||
|
#else
|
||||||
|
clear_history();
|
||||||
|
#endif
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user