Przeglądaj źródła

Dpkg::Source::Archive: Delete the current compressor SIGPIPE disposition

With some archives, the tar process will terminate prematurely if it
finds trailing zeros, but the compressor will try to keep feeding it
with data, although the other end of the pipe will now be gone. We
handle this already by ignoring processes terminated by SIGPIPE, but
if the process is ignoring SIGPIPE it might get terminated due to the
error from the write(2) call, which we are not handling. Reset the
SIGPIPE disposition to its default setting.

Closes: #756526
Guillem Jover 12 lat temu
rodzic
commit
95103016f2
2 zmienionych plików z 3 dodań i 1 usunięć
  1. 2 0
      debian/changelog
  2. 1 1
      scripts/Dpkg/Source/Archive.pm

+ 2 - 0
debian/changelog

@@ -84,6 +84,8 @@ dpkg (1.17.11) UNRELEASED; urgency=low
   * Add a hint to the “no dependency information found” error message in
     dpkg-shlibdeps, to check if the library is actually packaged.
     Thanks to Sylvestre Ledru <sylvestre@debian.org>. Closes: #756230
+  * Delete the current compressor SIGPIPE disposition in Dpkg::Source::Archive,
+    which fixes ignoring SIGPIPE from the calling process. Closes: #756526
 
   [ Updated programs translations ]
   * Danish (Joe Dalton). Closes: #754127

+ 1 - 1
scripts/Dpkg/Source/Archive.pm

@@ -120,7 +120,7 @@ sub extract {
     }
 
     # Prepare stuff that handles the input of tar
-    $self->ensure_open('r');
+    $self->ensure_open('r', delete_sig => [ 'PIPE' ]);
     $spawn_opts{from_handle} = $self->get_filehandle();
 
     # Call tar extraction process