diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:55:31 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:55:31 +0000 |
commit | 1ae93c94429de697fb17f7067367fbf32fd3b6fc (patch) | |
tree | dc02b0f8e2682908655ebf27ee5d9e6796ab84f1 /methods/gzip.cc | |
parent | d955fe80937173f6e4c609ae58a916b61137583d (diff) |
HP-UX fixes
Author: jgg
Date: 1999-12-10 23:40:29 GMT
HP-UX fixes
Diffstat (limited to 'methods/gzip.cc')
-rw-r--r-- | methods/gzip.cc | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/methods/gzip.cc b/methods/gzip.cc index f1bf60ce6..337219316 100644 --- a/methods/gzip.cc +++ b/methods/gzip.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: gzip.cc,v 1.8 1999/07/30 05:37:00 jgg Exp $ +// $Id: gzip.cc,v 1.9 1999/12/10 23:40:29 jgg Exp $ /* ###################################################################### GZip method - Take a file URI in and decompress it into the target @@ -17,7 +17,6 @@ #include <sys/stat.h> #include <unistd.h> #include <utime.h> -#include <wait.h> #include <stdio.h> /*}}}*/ @@ -73,19 +72,12 @@ bool GzipMethod::Fetch(FetchItem *Itm) From.Close(); // Wait for gzip to finish - int Status; - if (waitpid(Process,&Status,0) != Process) + if (ExecWait(Process,_config->Find("Dir::bin::gzip","gzip").c_str(),false) == false) { To.OpFail(); - return _error->Errno("wait","Waiting for gzip failed"); - } - - if (WIFEXITED(Status) == 0 || WEXITSTATUS(Status) != 0) - { - To.OpFail(); - return _error->Error("gzip failed, perhaps the disk is full or the directory permissions are wrong."); - } - + return false; + } + To.Close(); // Transfer the modification times |