fix kill message

This commit is contained in:
IoIxD 2026-01-22 17:09:35 -07:00
commit 4814482cb2

View file

@ -194,26 +194,28 @@ int msh_execute(char *cmd, char **args) {
msh_linux_setup_signals(); msh_linux_setup_signals();
ret = (SIZE_TYPE)SYSCALL(wait4, fork, &status, 0, &ru); SYSCALL(wait4, fork, &status, 0, &ru);
SYSCALL(kill, fork, SIGKILL); SYSCALL(kill, fork, SIGKILL);
SYSCALL(write, 1, "\r", 2); SYSCALL(write, 1, "\r", 2);
msh_linux_start_input_capture();
char pid_str[16]; char pid_str[16];
itoa(fork, pid_str, 10); itoa(fork, pid_str, 10);
if (WIFSIGNALED(status)) { if (WIFSIGNALED(status)) {
msh_print_strings(pid_str, "\t", (char *)signal_table[WTERMSIG(status)], msh_print_strings(pid_str, " ", (char *)signal_table[WTERMSIG(status)],
"\t", cmd, "\r\n", 0); " ", cmd, "\n\r", 0);
return WTERMSIG(status); ret = WTERMSIG(status);
} else if (WIFSTOPPED(status)) { } else if (WIFSTOPPED(status)) {
msh_print_strings(pid_str, "\tstopped\t", cmd, "\r\n", 0); msh_print_strings(pid_str, "\tstopped\t", cmd, "\n\r", 0);
ret = WEXITSTATUS(status);
} else { } else {
return WEXITSTATUS(status); ret = WEXITSTATUS(status);
} }
msh_linux_start_input_capture();
return ret;
} }
return 0; return 0;
}; };