From d989864712d07ebea6fea68d3c8ea57413b21493 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Tue, 3 Apr 2007 12:18:40 +0000 Subject: [PATCH] (main): Move closeopen after decode_options to allow shell process substitution to work. --- src/tar.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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. */ -- 2.44.0