]> Dogcows Code - chaz/tar/blobdiff - src/system.c
Supply more information to the --to-command script.
[chaz/tar] / src / system.c
index cf39dbd5c203f4400d6de58a701ad426edce261f..d646822c4a6ccc65ae0ad098b1b1f47956db6dd4 100644 (file)
@@ -331,7 +331,8 @@ sys_child_open_for_compress (void)
   /* The new born child tar is here!  */
 
   set_program_name (_("tar (child)"));
-
+  signal (SIGPIPE, SIG_DFL);
+  
   xdup2 (parent_pipe[PREAD], STDIN_FILENO);
   xclose (parent_pipe[PWRITE]);
 
@@ -474,7 +475,8 @@ sys_child_open_for_uncompress (void)
   /* The newborn child tar is here!  */
 
   set_program_name (_("tar (child)"));
-
+  signal (SIGPIPE, SIG_DFL);
+  
   xdup2 (parent_pipe[PWRITE], STDOUT_FILENO);
   xclose (parent_pipe[PREAD]);
 
@@ -627,6 +629,12 @@ static void
 stat_to_env (char *name, char type, struct tar_stat_info *st)
 {
   str_to_env ("TAR_VERSION", PACKAGE_VERSION);
+  str_to_env ("TAR_ARCHIVE", *archive_name_cursor);
+  dec_to_env ("TAR_VOLUME", archive_name_cursor - archive_name_array + 1);
+  dec_to_env ("TAR_BLOCKING_FACTOR", blocking_factor);
+  str_to_env ("TAR_FORMAT",
+             archive_format_string (current_format == DEFAULT_FORMAT ?
+                                    archive_format : current_format));
   chr_to_env ("TAR_FILETYPE", type);
   oct_to_env ("TAR_MODE", st->stat.st_mode);
   str_to_env ("TAR_FILENAME", name);
This page took 0.020519 seconds and 4 git commands to generate.