Forráskód Böngészése

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 éve
szülő
commit
95103016f2
2 módosított fájl, 3 hozzáadás és 1 törlés
  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
   * Add a hint to the “no dependency information found” error message in
     dpkg-shlibdeps, to check if the library is actually packaged.
     dpkg-shlibdeps, to check if the library is actually packaged.
     Thanks to Sylvestre Ledru <sylvestre@debian.org>. Closes: #756230
     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 ]
   [ Updated programs translations ]
   * Danish (Joe Dalton). Closes: #754127
   * 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
     # 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();
     $spawn_opts{from_handle} = $self->get_filehandle();
 
 
     # Call tar extraction process
     # Call tar extraction process