From 540fc6fbdb30971955dc40cc05542b5d4f434787 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 17 Dec 2010 16:27:16 +0100 Subject: 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(). --- src/memline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/memline.c') diff --git a/src/memline.c b/src/memline.c index e4e5bad35..7393324ab 100644 --- 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 -- cgit v1.2.1