]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire-worker.cc
Same bashism, different line.
[apt.git] / apt-pkg / acquire-worker.cc
index d5b4541a3c86addea0399d59f609897a44b1931d..f6b14da3c4b19a6a943ad4677d1931e41fd22882 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: acquire-worker.cc,v 1.26 1999/08/03 05:19:41 jgg Exp $
+// $Id: acquire-worker.cc,v 1.28 1999/10/18 00:37:35 jgg Exp $
 /* ######################################################################
 
    Acquire Worker 
@@ -86,7 +86,10 @@ pkgAcquire::Worker::~Worker()
    
    if (Process > 0)
    {
-      kill(Process,SIGINT);
+      /* Closing of stdin is the signal to exit and die when the process
+         indicates it needs cleanup */
+      if (Config->NeedsCleanup == false)
+        kill(Process,SIGINT);
       ExecWait(Process,Access.c_str(),true);
    }   
 }
@@ -249,7 +252,7 @@ bool pkgAcquire::Worker::RunMessages()
            pkgAcquire::ItemDesc Desc = *Itm;
            OwnerQ->ItemDone(Itm);
            if (TotalSize != 0 && 
-               atoi(LookupTag(Message,"Size","0").c_str()) != TotalSize)
+               (unsigned)atoi(LookupTag(Message,"Size","0").c_str()) != TotalSize)
               _error->Warning("Bizzar Error - File size is not what the server reported %s %u",
                               LookupTag(Message,"Size","0").c_str(),TotalSize);
 
@@ -323,6 +326,7 @@ bool pkgAcquire::Worker::Capabilities(string Message)
    Config->Pipeline = StringToBool(LookupTag(Message,"Pipeline"),false);
    Config->SendConfig = StringToBool(LookupTag(Message,"Send-Config"),false);
    Config->LocalOnly = StringToBool(LookupTag(Message,"Local-Only"),false);
+   Config->NeedsCleanup = StringToBool(LookupTag(Message,"Needs-Cleanup"),false);
 
    // Some debug text
    if (Debug == true)