From a3fc87752193cc9fb406b4c4b152e4ffb435dce5 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 7 Feb 2023 15:42:19 -0600 Subject: [PATCH] Don't kill archiver now we're listening for its exit code, shut it up by draining the trailing zeroes instead. Note: cpio lets you concatenate archives, but tar ignores everything after two zero blocks. --- toys/posix/tar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toys/posix/tar.c b/toys/posix/tar.c index 3a399863..3e2a2153 100644 --- a/toys/posix/tar.c +++ b/toys/posix/tar.c @@ -1118,7 +1118,7 @@ void tar_main(void) unpack_tar(hdr); dirflush(0, 0); // Shut up archiver about inability to write all trailing NULs to pipe buf - if (TT.pid>0) kill(TT.pid, 9); + while (0