/* 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);
}
pid_t grandchild_pid;
pid_t child_pid;
+ signal (SIGPIPE, SIG_IGN);
xpipe (parent_pipe);
child_pid = xfork ();
}
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)
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);