summaryrefslogtreecommitdiff
path: root/src/memline.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-12-17 16:27:16 +0100
committerBram Moolenaar <Bram@vim.org>2010-12-17 16:27:16 +0100
commit540fc6fbdb30971955dc40cc05542b5d4f434787 (patch)
treec1efeca8e355c647e60ff12e8cae8d942d7a3d29 /src/memline.c
parent45d9d02d715d8423ed5e786331d6e8970b86bf60 (diff)
downloadvim-git-540fc6fbdb30971955dc40cc05542b5d4f434787.tar.gz
updated for version 7.3.083v7.3.083
Problem: When a read() or write() is interrupted by a signal it fails. Solution: Add read_eintr() and write_eintr().
Diffstat (limited to 'src/memline.c')
-rw-r--r--src/memline.c4
1 files changed, 2 insertions, 2 deletions
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