re-mark 1.29b-2 as not yet uploaded (merge madness!)
[debian/tar] / src / system.c
index e1fd263c7daabe55c54e83832efb62c21093763f..71a812d5b7a2e01c3e94ee1e6fc2e472e949b1a5 100644 (file)
@@ -1,6 +1,7 @@
 /* System-dependent calls for tar.
 
-   Copyright 2003-2008, 2010, 2013 Free Software Foundation, Inc.
+   Copyright 2003-2008, 2010, 2013-2014, 2016 Free Software Foundation,
+   Inc.
 
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by the
 static _Noreturn void
 xexec (const char *cmd)
 {
-  struct wordsplit ws;
+  char *argv[4];
 
-  ws.ws_env = (const char **) environ;
-  if (wordsplit (cmd, &ws, (WRDSF_DEFFLAGS | WRDSF_ENV) & ~WRDSF_NOVAR))
-    FATAL_ERROR ((0, 0, _("cannot split string '%s': %s"),
-                 cmd, wordsplit_strerror (&ws)));
-  execvp (ws.ws_wordv[0], ws.ws_wordv);
+  argv[0] = (char *) "/bin/sh";
+  argv[1] = (char *) "-c";
+  argv[2] = (char *) cmd;
+  argv[3] = NULL;
+
+  execv ("/bin/sh", argv);
   exec_fatal (cmd);
 }
 
@@ -330,6 +332,7 @@ sys_child_open_for_compress (void)
   pid_t grandchild_pid;
   pid_t child_pid;
 
+  signal (SIGPIPE, SIG_IGN);
   xpipe (parent_pipe);
   child_pid = xfork ();
 
@@ -720,7 +723,7 @@ stat_to_env (char *name, char type, struct tar_stat_info *st)
 }
 
 static pid_t global_pid;
-static RETSIGTYPE (*pipe_handler) (int sig);
+static void (*pipe_handler) (int sig);
 
 int
 sys_exec_command (char *file_name, int typechar, struct tar_stat_info *st)
@@ -788,7 +791,7 @@ sys_exec_info_script (const char **archive_name, int volume_number)
   pid_t pid;
   char uintbuf[UINTMAX_STRSIZE_BOUND];
   int p[2];
-  static RETSIGTYPE (*saved_handler) (int sig);
+  static void (*saved_handler) (int sig);
 
   xpipe (p);
   saved_handler = signal (SIGPIPE, SIG_IGN);