I reported and submitted a patch for a terminal formatting issue in Debian's unzip package.
When unzip was interrupted with Ctrl+C at an interactive file-replacement prompt, the shell prompt could appear immediately after ^C on the same line instead of starting on a new line.
The issue was traced to the signal handler in fileio.c.
The existing implementation contained logic intended to print a newline when interrupted, but a compile-time condition excluded that behavior on systems defining SIGBUS or SIGSEGV, including Linux.
The patch preserves the existing behavior while adding a runtime check for SIGINT when the original compile-time condition suppresses the newline.
This allows the terminal to return to a clean new line after Ctrl+C without changing the program's existing exit behavior.
The change was tested by:
- Building
unzipwith the complete Debian patch series - Building the Debian binary package with
dpkg-buildpackage - Running Debian-profile Lintian checks
- Reproducing the original terminal behavior
- Verifying the corrected newline behavior
- Confirming that the exit code remains
80
Patch submitted to the Debian Bug Tracking System for maintainer review.