summaryrefslogtreecommitdiff
path: root/devel/ArX/patches/patch-ab
blob: da9febb761e3e9dccb3c4a6e624dcbb69b8b5978 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$NetBSD: patch-ab,v 1.1 2004/08/09 10:06:13 drochner Exp $

--- src/arx/utility_functions/Spawn.cpp.orig	2004-08-08 18:33:40.000000000 +0200
+++ src/arx/utility_functions/Spawn.cpp
@@ -114,10 +114,13 @@ bool Spawn::execute(int &return_exit_sta
           if(child_pid)
             {
               /* This is the parent. */
+	      int res;
               
-              if(-1!=waitpid(child_pid,&exit_status,0) && result==TRUE)
-                {
-                  if(WIFEXITED(exit_status))
+	      do {
+		      res=waitpid(child_pid,&exit_status,0);
+	      } while (res < 0 && errno == EINTR);
+
+	      if ((res >= 0) && WIFEXITED(exit_status))
                     {
                       return_exit_status=WEXITSTATUS(exit_status);
                     }
@@ -125,7 +128,6 @@ bool Spawn::execute(int &return_exit_sta
                     {
                       result=FALSE;
                     }
-                }
             }
           else
             {