Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Debian unzip — SIGINT Terminal Formatting Fix


Bug #1144371 — Shell prompt remains on the same line after SIGINT

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.

Investigation

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.

Patch

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.

Testing

The change was tested by:

  • Building unzip with 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

Links

Status

Patch submitted to the Debian Bug Tracking System for maintainer review.


About

Investigation, patch, and Debian package testing for unzip bug #1144371, fixing terminal formatting after SIGINT (Ctrl+C).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors