summaryrefslogtreecommitdiff
path: root/devel/ArX/patches/patch-ab
blob: 8fcb3f0728325cb6a3c7672b0ae788ee141df100 (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
30
31
32
33
34
35
36
37
$NetBSD: patch-ab,v 1.2 2005/01/23 19:34:14 kristerw Exp $

--- src/arx/utility_functions/Spawn.cpp.orig	Wed Apr 21 22:44:08 2004
+++ src/arx/utility_functions/Spawn.cpp	Sun Jan 23 20:30:02 2005
@@ -25,6 +25,7 @@
 #include <string>
 #include <glib.h>
 #include <string.h>
+#include <errno.h>
 #include "boost/filesystem/path.hpp"
 #include "arx_error.hpp"
 
@@ -114,10 +115,13 @@
           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 +129,6 @@
                     {
                       result=FALSE;
                     }
-                }
             }
           else
             {