瀏覽代碼

* apt-pkg/deb/dpkgpm.cc:
- replace obsolete usleep with nanosleep

David Kalnischkies 15 年之前
父節點
當前提交
b6ff69135e
共有 2 個文件被更改,包括 6 次插入3 次删除
  1. 3 2
      apt-pkg/deb/dpkgpm.cc
  2. 3 1
      debian/changelog

+ 3 - 2
apt-pkg/deb/dpkgpm.cc

@@ -391,8 +391,9 @@ void pkgDPkgPM::DoTerminalPty(int master)
    {
    {
       // this happens when the child is about to exit, we
       // this happens when the child is about to exit, we
       // give it time to actually exit, otherwise we run
       // give it time to actually exit, otherwise we run
-      // into a race
-      usleep(500000);
+      // into a race so we sleep for half a second.
+      struct timespec sleepfor = { 0, 500000000 };
+      nanosleep(&sleepfor, NULL);
       return;
       return;
    }  
    }  
    if(len <= 0) 
    if(len <= 0) 

+ 3 - 1
debian/changelog

@@ -11,8 +11,10 @@ apt (0.8.14.1) unstable; urgency=low
       memory first before writing to avoid hitting limits
       memory first before writing to avoid hitting limits
   * apt-pkg/orderlist.cc:
   * apt-pkg/orderlist.cc:
     - let VisitRProvides report if the calls were successful
     - let VisitRProvides report if the calls were successful
+  * apt-pkg/deb/dpkgpm.cc:
+    - replace obsolete usleep with nanosleep
 
 
- -- David Kalnischkies <kalnischkies@gmail.com>  Sat, 16 Apr 2011 17:13:08 +0200
+ -- David Kalnischkies <kalnischkies@gmail.com>  Sat, 16 Apr 2011 18:54:37 +0200
 
 
 apt (0.8.14) unstable; urgency=low
 apt (0.8.14) unstable; urgency=low