#ifndef lint
static const char rcsid[] =
- "$Id: tape.c,v 1.19 2000/05/28 16:24:14 stelian Exp $";
+ "$Id: tape.c,v 1.21 2000/08/19 22:06:03 stelian Exp $";
#endif /* not lint */
#ifdef __linux__
if (pid == 0) {
setuid(getuid());
setgid(getgid());
+#if OLD_STYLE_FSCRIPT
+ snprintf(commandstr, sizeof(commandstr), "%s", command);
+#else
snprintf(commandstr, sizeof(commandstr), "%s %s %d", command, device, volnum);
+#endif
commandstr[sizeof(commandstr) - 1] = '\0';
execl("/bin/sh", "sh", "-c", commandstr, NULL);
perror(" DUMP: unable to execute shell");
static void
proceed(int signo)
{
- caught++;
if (ready)
siglongjmp(jmpbuf, 1);
+ caught++;
}
void
master = getpid();
{ struct sigaction sa;
+ sa.sa_sigaction = NULL;
+ sigemptyset(&sa.sa_mask);
+ sa.sa_flags = 0;
sa.sa_handler = dumpabort;
sigaction(SIGTERM, &sa, NULL); /* Slave sends SIGTERM on dumpabort() */
sa.sa_handler = sigpipe;
if (wrote < 0) {
(void) kill(master, SIGUSR1);
sigemptyset(&sigset);
+ sigaddset(&sigset, SIGINT);
for (;;)
sigsuspend(&sigset);
} else {