diff options
| author | czjstmax <jstmaxlol@disroot.org> | 2026-03-19 18:44:16 +0100 |
|---|---|---|
| committer | czjstmax <jstmaxlol@disroot.org> | 2026-03-19 18:44:16 +0100 |
| commit | 7ae762e4f146f4d97bf8d50b6569c5cfcb622c7e (patch) | |
| tree | 697cdb2b736447003522bc1158a64b9b35e37ddc /nm.c | |
| parent | 34938a8148dfca66c4d74b1bab1c70f6ba855fb8 (diff) | |
added debug stuff and fixed ^C
Signed-off-by: czjstmax <jstmaxlol@disroot.org>
Diffstat (limited to 'nm.c')
| -rw-r--r-- | nm.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -106,7 +106,7 @@ int main(void) waitpid(pid, &status, 0); } else { - printf("nsh+! couldn't open %s", p.we_wordv[0]); + fprintf(stderr, "nsh+! ERROR: couldn't execute %s\n", p.we_wordv[0]); } } } @@ -114,9 +114,11 @@ int main(void) void handlecc(int sig) { - printf("\nnsh+! %d caught.\nfreeing stuff before quitting.\n", sig); - FreeAll(); - exit(0); + (void)sig; + rl_replace_line("", 0); + printf("\n"); + rl_on_new_line(); + rl_redisplay(); } void FreeAll() |