• cmiller@zippy.cornsilk.net's avatar
    Bug#4053: too many of "error 1236: 'binlog truncated in the middle of \ · 2c356ec7
    cmiller@zippy.cornsilk.net authored
    	event' from master"
    
    Since there is no repeatable test case, and this is obviously wrong, this is
    the most conservative change that might possibly work.  
    
    The syscall  read()  wasn't checked for a negative return value for an
    interrupted read.  The kernel  sys_read()  returns -EINTR, and the "library" 
    layer maps that to return value of -1 and sets  errno  to EINTR.  It's 
    impossible (on Linux) for  read()  to set errno EINTR without the return 
    value being -1 .
    
    So, if we're checking for EINTR behavior, we should not require that the
    return value be zero.
    2c356ec7
my_read.c 2.74 KB