bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] --exclude-from using process substitution fails


From: Sergey Poznyakoff
Subject: Re: [Bug-tar] --exclude-from using process substitution fails
Date: Tue, 03 Apr 2007 15:22:54 +0300

Bdale Garbee <address@hidden> wrote:

> A user of my Debian package of tar reports a problem in version 1.16 where
> doing something like
> 
>       tar -cf test.tar ~/.mozilla --exclude-from=<(cat /etc/group)
> 
> results in the following error output:
> 
>    tar: /dev/fd/63: No such file or directory
>    tar: Error is not recoverable: exiting now

Thank you. I have installed the following patch:

2007-04-03  Sergey Poznyakoff  <address@hidden>

        * src/tar.c (main): Move closeopen after decode_options to
        allow shell process substitution to work.

Index: src/tar.c
===================================================================
RCS file: /cvsroot/tar/tar/src/tar.c,v
retrieving revision 1.165
diff -p -u -r1.165 tar.c
--- src/tar.c   30 Mar 2007 19:19:56 -0000      1.165
+++ src/tar.c   3 Apr 2007 12:17:28 -0000
@@ -2302,9 +2302,6 @@ main (int argc, char **argv)
   /* Make sure we have first three descriptors available */
   stdopen ();
 
-  /* Close all inherited open descriptors, except for the first three */
-  closeopen ();
-
   /* Pre-allocate a few structures.  */
 
   allocated_archive_names = 10;
@@ -2322,6 +2319,10 @@ main (int argc, char **argv)
   /* Decode options.  */
 
   decode_options (argc, argv);
+
+  /* Close all inherited open descriptors, except for the first three */
+  closeopen ();
+
   name_init ();
 
   /* Main command execution.  */


Regards,
Sergey   




reply via email to

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