diff src/memline.c @ 2664:033e7b49356c v7.3.083

updated for version 7.3.083 Problem: When a read() or write() is interrupted by a signal it fails. Solution: Add read_eintr() and write_eintr().
author Bram Moolenaar <bram@vim.org>
date Fri, 17 Dec 2010 16:27:16 +0100
parents 2a9d26c95a2a
children 1a0d346695fa
line wrap: on
line diff
--- a/src/memline.c
+++ b/src/memline.c
@@ -2062,7 +2062,7 @@ swapfile_info(fname)
     fd = mch_open((char *)fname, O_RDONLY | O_EXTRA, 0);
     if (fd >= 0)
     {
-	if (read(fd, (char *)&b0, sizeof(b0)) == sizeof(b0))
+	if (read_eintr(fd, &b0, sizeof(b0)) == sizeof(b0))
 	{
 	    if (STRNCMP(b0.b0_version, "VIM 3.0", 7) == 0)
 	    {
@@ -4392,7 +4392,7 @@ findswapname(buf, dirp, old_fname)
 		fd = mch_open((char *)fname, O_RDONLY | O_EXTRA, 0);
 		if (fd >= 0)
 		{
-		    if (read(fd, (char *)&b0, sizeof(b0)) == sizeof(b0))
+		    if (read_eintr(fd, &b0, sizeof(b0)) == sizeof(b0))
 		    {
 			/*
 			 * If the swapfile has the same directory as the