aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r--src/nvim/fileio.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index ae6c3f96e3..9214e1e644 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -4448,7 +4448,12 @@ bool vim_fgets(char_u *buf, int size, FILE *fp) FUNC_ATTR_NONNULL_ALL
char tbuf[FGETS_SIZE];
buf[size - 2] = NUL;
+retry:
+ errno = 0;
eof = fgets((char *)buf, size, fp);
+ if (eof == NULL && errno == EINTR) {
+ goto retry;
+ }
if (buf[size - 2] != NUL && buf[size - 2] != '\n') {
buf[size - 1] = NUL; /* Truncate the line */