diff options
author | Francois Pons <fpons@mandriva.com> | 2001-01-05 14:40:16 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2001-01-05 14:40:16 +0000 |
commit | f2cd5f432f6a2474fbd44a1c0fb9feb9cf99ad8d (patch) | |
tree | 89e7bc55137c0350554e7379f19e92a53e93ed74 | |
parent | 9d713c04e29b81e0f778f7d1861f600f63cf958a (diff) | |
download | rpmtools-f2cd5f432f6a2474fbd44a1c0fb9feb9cf99ad8d.tar rpmtools-f2cd5f432f6a2474fbd44a1c0fb9feb9cf99ad8d.tar.gz rpmtools-f2cd5f432f6a2474fbd44a1c0fb9feb9cf99ad8d.tar.bz2 rpmtools-f2cd5f432f6a2474fbd44a1c0fb9feb9cf99ad8d.tar.xz rpmtools-f2cd5f432f6a2474fbd44a1c0fb9feb9cf99ad8d.zip |
changed exit by exec 'true'
-rw-r--r-- | packdrake.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packdrake.pm b/packdrake.pm index 0897131..2902d37 100644 --- a/packdrake.pm +++ b/packdrake.pm @@ -382,7 +382,7 @@ sub extract_archive { #- of uncompress executable. foreach (sort { $a <=> $b } keys %extract_table) { local *OUTPUT; - if (open OUTPUT, "-|") { + if (my $pid = open OUTPUT, "-|") { #- $curr_off is used to handle the reading in a pipe and simulating #- a seek on it as done by catsksz, so last file position is #- last byte not read (ie last block read start + last block read size). @@ -394,13 +394,14 @@ sub extract_archive { catsksz(\*OUTPUT, $off - $curr_off, $siz, \*FILE); $curr_off = $off + $siz; } + waitpid $pid, 0; } else { local *BUNZIP2; open BUNZIP2, "| $packer->{uncompress}"; local *ARCHIVE; open ARCHIVE, "<$packer->{archive}" or die "packdrake: cannot open archive $packer->{archive}\n"; catsksz(\*ARCHIVE, $_, $extract_table{$_}[0], \*BUNZIP2); - exit 0; + exec 'true'; } } } |