>>> On 9/10/2007 at 3:22 PM, in message
<[EMAIL PROTECTED]>, "Bernard Li"
<[EMAIL PROTECTED]> wrote:
> HI Brad:
> 
> On 9/10/07, Brad Nicholes <[EMAIL PROTECTED]> wrote:
> 
>>    But I do have one question regarding the 3.0.5 POLLHUP patch.  It looks 
> like the real problem with the code is that on an EOF, POLLIN and POLLHUP are 
> actually received together.  Therefore, the code in data_thread.c would go 
> ahead and read the recv buffer and the proceed to throw everything away in 
> the following "if" statement that checks for POLLHUP.  If this is the case, 
> then would the following patch work better for all platforms without having 
> to #ifdef the code as well as still allowing POLLHUP to stand on it own?  
> (BTW, this patch is against trunk, not 3.0.5)
>>
>> Index: data_thread.c
>> ===================================================================
>> --- data_thread.c       (revision 829)
>> +++ data_thread.c       (working copy)
>> @@ -130,6 +130,10 @@
>>                                   break;
>>                                }
>>                             read_index+= bytes_read;
>> +                           if( struct_poll.revents & POLLHUP )
>> +                              {
>> +                                 break;
>> +                              }
>>                          }
>>                       if( struct_poll.revents & POLLHUP )
>>                          {
>>
>> This patch would just detect the EOF condition signaled by POLLIN | POLLHUP 
> and allow the data buffer to process the data normally in the same way as if 
> bytes_read == 0.
> 
> If you believe this is a better patch, please feel free to check this
> into both branch/trunk and I'll release another candidate for testing
> (with some other patches as well).
> 
> It would be even better if folks could test this patch prior to the
> check-in so we know for sure this works fine on Intel/ppc Mac OSX.
> 
> Cheers,
> 
> Bernard

That is really the question.  I am simply making an assumption without any way 
to test it.  I would ask those that have access to Max OSX, to apply this patch 
and test it before we commit it to 3.0.5 or trunk.

Brad


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to