diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-02-07 22:39:00 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-02-07 22:39:00 +0000 |
commit | f2d268b847e19bbb5f674dfafc4452c35918e868 (patch) | |
tree | 582c5d8e0447ef33386cef1bd5a43a44f33f65ec /URPM.xs | |
parent | 18723d2d47f9e069667753703c12ba5139661957 (diff) | |
download | perl-URPM-f2d268b847e19bbb5f674dfafc4452c35918e868.tar perl-URPM-f2d268b847e19bbb5f674dfafc4452c35918e868.tar.gz perl-URPM-f2d268b847e19bbb5f674dfafc4452c35918e868.tar.bz2 perl-URPM-f2d268b847e19bbb5f674dfafc4452c35918e868.tar.xz perl-URPM-f2d268b847e19bbb5f674dfafc4452c35918e868.zip |
(open_archive) clean API
Diffstat (limited to 'URPM.xs')
-rw-r--r-- | URPM.xs | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -999,7 +999,7 @@ update_provides_files(URPM__Package pkg, HV *provides) { } FD_t -open_archive(char *filename, pid_t *pid, int *empty_archive) { +open_archive(char *filename, int *empty_archive) { int fd; FD_t rfd = NULL; struct { @@ -3395,11 +3395,10 @@ Urpm_parse_hdlist__XS(urpm, filename, ...) HV *obsoletes = fobsoletes && SvROK(*fobsoletes) && SvTYPE(SvRV(*fobsoletes)) == SVt_PVHV ? (HV*)SvRV(*fobsoletes) : NULL; if (depslist != NULL) { - pid_t pid = 0; int empty_archive = 0; FD_t fd; - fd = open_archive(filename, &pid, &empty_archive); + fd = open_archive(filename, &empty_archive); if (empty_archive) { mXPUSHs(newSViv(1 + av_len(depslist))); @@ -3453,13 +3452,7 @@ Urpm_parse_hdlist__XS(urpm, filename, ...) int ok = Fclose(fd) == 0; - if (pid) { - kill(pid, SIGTERM); - int status; - int rc = waitpid(pid, &status, 0); - ok = rc != -1 && WEXITSTATUS(status) != 1; /* in our standard case, gzip will exit with status code 2, meaning "decompression OK, trailing garbage ignored" */ - pid = 0; - } else if (!empty_archive) { + if (!empty_archive) { ok = av_len(depslist) >= start_id; } SPAGAIN; |