bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] tar: broken behaviour with input/output pipe and compression


From: Petr Salinger
Subject: [Bug-tar] tar: broken behaviour with input/output pipe and compression
Date: Wed, 17 Jun 2009 16:19:37 +0200 (CEST)

Hi,

the current version (1.22) of tar breaks build of gcj-4.4 on GNU/kFreeBSD.

https://buildd.debian.org/fetch.cgi?&pkg=gcj-4.4&ver=4.4.0-6j1&arch=kfreebsd-amd64&stamp=1245000137&file=log:

        uudecode -o - java-classes.tgz.uue | tar -C src -xvz
        libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main.class
        sbuild received SIGPIPE -- shutting down

It looks like related to Debian bugs #525437, #532570, #525818.

The problem appears when a grandchild tar is used.
In the "child_pid", the child_pid is zero, the kill() signals
every process in the process group of the calling process
instead of themselves.

Can be fixed by patch bellow.

Thanks in advance

                        Petr

--- src/system.c~       2009-03-29 05:23:17.000000000 +0200
+++ src/system.c        2009-06-16 21:11:20.000000000 +0200
@@ -435,7 +435,7 @@

   if (WIFSIGNALED (wait_status))
     {
-      kill (child_pid, WTERMSIG (wait_status));
+      kill (getpid(), WTERMSIG (wait_status));
       exit_status = TAREXIT_FAILURE;
     }
   else if (WEXITSTATUS (wait_status) != 0)
@@ -573,7 +573,7 @@

   if (WIFSIGNALED (wait_status))
     {
-      kill (child_pid, WTERMSIG (wait_status));
+      kill (getpid(), WTERMSIG (wait_status));
       exit_status = TAREXIT_FAILURE;
     }
   else if (WEXITSTATUS (wait_status) != 0)

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=533356





reply via email to

[Prev in Thread] Current Thread [Next in Thread]