int status;
int cpioFailed = 0;
void * oldhandler;
- char * cpioBinary;
int needSecondPipe;
char line[1024];
int j;
if (specFile) *specFile = NULL;
- if (access("/bin/cpio", X_OK)) {
- if (access("/usr/bin/cpio", X_OK)) {
- error(RPMERR_CPIO, "cpio cannot be found in /bin or /usr/sbin");
- return 1;
- } else
- cpioBinary = "/usr/bin/cpio";
- } else
- cpioBinary = "/bin/cpio";
-
args = alloca(sizeof(char *) * (fileCount + 10));
- args[i++] = cpioBinary;
+ args[i++] = "cpio";
args[i++] = "--extract";
args[i++] = "--unconditional";
args[i++] = "--preserve-modification-time";
close(statusPipe[1]);
}
- execv(args[0], args);
+ execvp(args[0], args);
exit(-1);
}