From: Sergey Poznyakoff Date: Tue, 3 Apr 2007 12:18:40 +0000 (+0000) Subject: (main): Move closeopen after decode_options to allow shell process substitution to... X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=d989864712d07ebea6fea68d3c8ea57413b21493;p=chaz%2Ftar (main): Move closeopen after decode_options to allow shell process substitution to work. --- diff --git a/src/tar.c b/src/tar.c index 90f6592..0b17359 100644 --- a/src/tar.c +++ b/src/tar.c @@ -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. */