Hi guys

I think this is not the case. This is for redhat linux box.
We use in the main script the command tar cvf to generate the output without 
any other options. The rare thing here is that manualy run it work just fine, 
but when run it by script does not compress all filesn and that script it 
working for many years ago.

I will later paste the main script
Thanks
Alv




From: Thorsten Hirsch [mailto:[email protected]]
Sent: Friday, May 02, 2014 02:31 PM
To: Paul Eggert <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: [Bug-tar] segfault on solaris 11.1 with --remove-files in current 
directory

Hi Paul,

yes, the patch works exactly as you described: no segfault anymore, but an 
error, that can be fixed with the -C parameter.
Thank you very much!

@Joerg: In this case the output of pstack was more or less the same as the 
output of gdb. But your command for "fixing" null pointer bugs looks very 
interesting. I haven't seen that library before.

Thorsten



2014-04-29 23:30 GMT+02:00 Paul Eggert 
<[email protected]<mailto:[email protected]>>:
Thanks for reporting that.  It's a bug on GNU/Linux too.  I installed the 
attached patch; please give it a try if you have the time.

I should mention that older versions of GNU tar did not try to remove 
directories in this case, which explains why you didn't see a problem with tar 
trying to remove ".".   With the fix, tar will complain that it can't remove 
".", which is arguably the correct behavior.  To have the fixed tar remove "." 
without complaining, please use the -C option, e.g., something like this:

$ mkdir test
$ touch test/foo
$ tar --remove-files -cf test.tar -C test .
$ ls -al test
ls: cannot access test: No such file or directory
$ tar -tvf test.tar
drwxr-xr-x eggert/eggert     0 2014-04-29 14:26 ./
-rw-r--r-- eggert/eggert     0 2014-04-29 14:26 ./foo


Reply via email to