Imported Upstream version 14.45.18 upstream/14.45.18
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 2 Sep 2019 07:09:18 +0000 (16:09 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 2 Sep 2019 07:09:18 +0000 (16:09 +0900)
VERSION.cmake
package/libzypp.changes
zypp/ExternalProgram.cc

index 3fedcce..496bf85 100644 (file)
@@ -61,8 +61,8 @@
 SET(LIBZYPP_MAJOR "14")
 SET(LIBZYPP_COMPATMINOR "39")
 SET(LIBZYPP_MINOR "45")
-SET(LIBZYPP_PATCH "17")
+SET(LIBZYPP_PATCH "18")
 #
-# LAST RELEASED: 14.45.17 (39)
+# LAST RELEASED: 14.45.18 (39)
 # (The number in parenthesis is LIBZYPP_COMPATMINOR)
 #=======
index a36510e..7181c36 100644 (file)
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Mon Oct  1 14:37:39 CEST 2018 - ma@suse.de
+
+- Fix blocking wait for finished child process (bsc#1109877)
+- version 14.45.18 (39)
+
+-------------------------------------------------------------------
 Fri Aug 31 08:28:08 CEST 2018 - ma@suse.de
 
 - lsof: use '-K i' if lsof supports it (bsc#1099847, bsc#1036304)
index d415298..fbdffd2 100644 (file)
@@ -476,20 +476,23 @@ namespace zypp {
          } while ( true );
        }
 
-       // Wait for child to exit
-       int ret;
-       int status = 0;
-       do
+       if ( pid > 0 )  // bsc#1109877: must re-check! running() in the loop above may have already waited.
        {
-         ret = waitpid(pid, &status, 0);
-       }
-       while (ret == -1 && errno == EINTR);
+         // Wait for child to exit
+         int ret;
+         int status = 0;
+         do
+         {
+           ret = waitpid(pid, &status, 0);
+         }
+         while (ret == -1 && errno == EINTR);
 
-       if (ret != -1)
-       {
-        _exitStatus = checkStatus( status );
+         if (ret != -1)
+         {
+           _exitStatus = checkStatus( status );
+         }
+         pid = -1;
        }
-       pid = -1;
       }
 
       return _exitStatus;