diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc index 012ecb356..b72f01f22 100644 --- a/winsup/cygwin/fhandler_termios.cc +++ b/winsup/cygwin/fhandler_termios.cc @@ -133,7 +133,8 @@ tty_min::kill_pgrp (int sig) siginfo_t si = {0}; si.si_signo = sig; si.si_code = SI_KERNEL; - last_sig = sig; + if (sig > 0 && sig < _NSIG) + last_sig = sig; for (unsigned i = 0; i < pids.npids; i++) {