37 lines
1 KiB
Text
37 lines
1 KiB
Text
$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
|
|
{
|