1
0
mirror of https://github.com/simh/simh.git synced 2026-03-02 17:55:17 +00:00

SCP: treat SIGTERM and SIGHUP as equivalent

This commit is contained in:
John D. Bruner
2025-05-07 20:19:48 -07:00
parent 8b597d32aa
commit 729502aa9d

8
scp.c
View File

@@ -3368,7 +3368,7 @@ while (stat != SCPE_EXIT) { /* in case exit */
sim_cptr_is_action[sim_do_depth] = FALSE;
}
if (cptr == NULL) { /* EOF? or SIGINT? */
if (sim_ttisatty()) {
if (sim_ttisatty() && (!sigterm_received)) {
printf ("\n");
continue; /* ignore tty EOF */
}
@@ -10238,7 +10238,11 @@ else
void int_handler (int sig)
{
stop_cpu = TRUE;
if (sig == SIGTERM)
if ((sig == SIGTERM)
#ifdef SIGHUP
|| (sig == SIGHUP)
#endif
)
sigterm_received = TRUE;
sim_interval = 0; /* Minimize when stop_cpu gets noticed */
}