bug-tar
[Top][All Lists]
Advanced

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

[Bug-tar] [Fwd: Bug#533356: tar: broken behaviour with input/output pipe


From: Bdale Garbee
Subject: [Bug-tar] [Fwd: Bug#533356: tar: broken behaviour with input/output pipe and compression]
Date: Sat, 20 Jun 2009 09:49:28 -0600

Please see the attached proposed patch from Petr Salinger.  Looks
reasonable to me... your thoughts?

Bdale

--- Begin Message --- Subject: Bug#533356: tar: broken behaviour with input/output pipe and compression Date: Tue, 16 Jun 2009 21:58:16 +0200 (CEST)
Package: tar
Severity: important
Version: 1.22-1
Tags: patch
User: address@hidden
Usertags: kfreebsd

Hi,

the current version 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 #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.

Please apply patch bellow, it would also be nice
if you can inform upstream about this issue.

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)




--- End Message ---

reply via email to

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