diff options
author | drochner <drochner@pkgsrc.org> | 2004-08-09 10:06:13 +0000 |
---|---|---|
committer | drochner <drochner@pkgsrc.org> | 2004-08-09 10:06:13 +0000 |
commit | 025fe7fc6500c42e1f14b8dd8b07eaf48b1c801d (patch) | |
tree | 66e583e8e68012fc19e5ce5ef0fec26f737d80e6 /devel/ArX/patches | |
parent | faca441389cd20aa0b25542cd5dbecfe0a92f629 (diff) | |
download | pkgsrc-025fe7fc6500c42e1f14b8dd8b07eaf48b1c801d.tar.gz |
fix handling of wait() return values
(actually, add some error handling)
Diffstat (limited to 'devel/ArX/patches')
-rw-r--r-- | devel/ArX/patches/patch-ab | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/devel/ArX/patches/patch-ab b/devel/ArX/patches/patch-ab new file mode 100644 index 00000000000..da9febb761e --- /dev/null +++ b/devel/ArX/patches/patch-ab @@ -0,0 +1,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 + { |