bug-tar
[Top][All Lists]
Advanced

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

[Bug-tar] tar -vf /dev/stdout produces corrupted archives


From: Radek Brich
Subject: [Bug-tar] tar -vf /dev/stdout produces corrupted archives
Date: Mon, 10 Dec 2007 18:56:55 +0100
User-agent: KMail/1.9.6 (enterprise 0.20071012.724442)

Hi,

I've received interesting bug for tar. It's reported at 
https://bugzilla.redhat.com/show_bug.cgi?id=408621 .
In short, tar -cvf /dev/stdout [files or dirs] > output.tar
leads to corrupted archive. Tar is testing only for "-" when deciding if it 
should send listing to stdout or to stderr.
I wrote patch which enables such handling also for /dev/stdout (it's 
attached).

So, is this behaviour known? Are users supposed to avoid this or should it be 
fixed? I realize that the patch is not very clean as the absolute path is 
platform dependent, but maybe there are other ways (e.g. somehow test if file 
descriptor points to stdout).

Just wanted to know your opinion as from upstream developers (... and 
hopefully get it fixed in upstream :))

Thanks,
-- 
           Radek Brich
   /__\    Base OS/core services
 ~~~~~~~~  Red Hat, Brno, Czech Rep.

Attachment: tar-1.17-dev-stdout.patch
Description: Text Data

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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