#ifndef lint
static const char rcsid[] =
- "$Id: dumprmt.c,v 1.7 1999/10/30 22:55:50 tiniou Exp $";
+ "$Id: dumprmt.c,v 1.9 2000/01/11 12:33:44 tiniou Exp $";
#endif /* not lint */
#ifdef __linux__
static int rmtstate = TS_CLOSED;
static int tormtape = -1;
static int fromrmtape = -1;
+int rshpid = -1;
static const char *rmtpeer = 0;
static int okname __P((const char *));
rshcmd[4] = rmt;
rshcmd[5] = NULL;
- if (piped_child(rshcmd) < 0) {
+ if ((rshpid = piped_child(rshcmd)) < 0) {
msg("cannot open connection\n");
return 0;
}
msg ("cannot dup2 pipe: %s\n", strerror(errno));
exit(1);
}
+ setpgid(0, getpid());
execvp (command[0], (char *const *) command);
msg("cannot exec %s: %s\n", command[0], strerror(errno));
exit(1);