[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [PATCH] rgmanager: Fix short read handling while loading resource rules



If a short read occurs (maybe due to a race between the parent/child
processes in SMP systems?) while reading from the pipe while using
resource rules, we break the loop early even if there's more data to be
had at a later time.

It fixed the problem for the reporter.

-- Lon

Index: resrules.c
===================================================================
RCS file: /cvs/cluster/cluster/rgmanager/src/daemons/resrules.c,v
retrieving revision 1.16.2.9
diff -u -r1.16.2.9 resrules.c
--- resrules.c	18 Dec 2007 17:52:56 -0000	1.16.2.9
+++ resrules.c	30 Jan 2008 18:35:14 -0000
@@ -906,7 +906,7 @@
 		if (n == 0 && (!*length))
 			return 0;
 
-		if (n != sizeof(buf)) {
+		if (n == 0) {
 			done = 1;
 		}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]