]> git.saurik.com Git - apt.git/blobdiff - methods/gzip.cc
* merged from apt--tasks
[apt.git] / methods / gzip.cc
index 75a0389793512ba433d1fd88ff343c5ebbc4f9c7..55ff332701b94105de7cc6207b4a4d59e3db7bd2 100644 (file)
@@ -57,7 +57,7 @@ bool GzipMethod::Fetch(FetchItem *Itm)
       return _error->Errno("pipe",_("Couldn't open pipe for %s"),Prog);
 
    // Fork gzip
-   int Process = ExecFork();
+   pid_t Process = ExecFork();
    if (Process == 0)
    {
       close(GzOut[0]);
@@ -111,6 +111,7 @@ bool GzipMethod::Fetch(FetchItem *Itm)
       if (To.Write(Buffer,Count) == false)
       {
         Failed = true;
+        FromGz.Close();
         break;
       }      
    }