pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/ArX fix handling of wait() return values
details: https://anonhg.NetBSD.org/pkgsrc/rev/b95ad517801d
branches: trunk
changeset: 479237:b95ad517801d
user: drochner <drochner%pkgsrc.org@localhost>
date: Mon Aug 09 10:06:13 2004 +0000
description:
fix handling of wait() return values
(actually, add some error handling)
diffstat:
devel/ArX/distinfo | 3 ++-
devel/ArX/patches/patch-ab | 29 +++++++++++++++++++++++++++++
2 files changed, 31 insertions(+), 1 deletions(-)
diffs (44 lines):
diff -r 04e47722f712 -r b95ad517801d devel/ArX/distinfo
--- a/devel/ArX/distinfo Mon Aug 09 08:34:38 2004 +0000
+++ b/devel/ArX/distinfo Mon Aug 09 10:06:13 2004 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.1.1.1 2004/07/05 12:35:43 recht Exp $
+$NetBSD: distinfo,v 1.2 2004/08/09 10:06:13 drochner Exp $
SHA1 (ArX-1.0.20.tar.gz) = 3db4ff49fb827caf1d1f729c43f2877dc1f7232d
Size (ArX-1.0.20.tar.gz) = 8266849 bytes
SHA1 (patch-aa) = a0b75602438ddac4a5dd5eebae351fe225b178e5
+SHA1 (patch-ab) = 0e7a6be1e9342a6c66e929a82cc304216cb4892e
diff -r 04e47722f712 -r b95ad517801d devel/ArX/patches/patch-ab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/ArX/patches/patch-ab Mon Aug 09 10:06:13 2004 +0000
@@ -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
+ {
Home |
Main Index |
Thread Index |
Old Index