[PATCH lib/libXfont] If Socket is getting interrupted with signal EINTR, after re attempts we are closing socket connection, which is wrong.

Arvind Umrao arvind.umrao at oracle.com
Thu Aug 23 03:45:04 PDT 2012


Code changes are integrated in Solaris and now I am trying to give back to community. If Socket is getting interrupted with signal EINTR, we should keep socket in progress state. I have borrowed following code from Socket Write _fs_flush():line274 . I have done exactly same at _fs_fill (). Socket Write will not close the connection and re attempt to read buffer.

Signed-off-by: Arvind Umrao <arvind.umrao at oracle.com>
---
 src/fc/fsio.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/fc/fsio.c b/src/fc/fsio.c
index 03a689f..4deab88 100644
--- a/src/fc/fsio.c
+++ b/src/fc/fsio.c
@@ -184,8 +184,11 @@ _fs_fill (FSFpePtr conn)
 		    continue;
 		}
 	    }
-	    _fs_connection_died (conn);
-	    return FSIO_ERROR;
+	    if (!ECHECK(EINTR))
+	    {
+	        _fs_connection_died (conn);
+	        return FSIO_ERROR;
+	    }
 	}
     }
     return FSIO_READY;
-- 
1.7.9.2



More information about the xorg-devel mailing list