rgmanager: Fix short read handling while loading resource rules
PATCH 1/1 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
resrules.c +1 -1
@@ -906,7 +906,7 @@if (n ==0 && (!*length))return 0 ; -if (n !=sizeof (buf)) { +if (n ==0 ) { done =1 ; }