aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--e-util/e-xml-utils.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/e-util/e-xml-utils.c b/e-util/e-xml-utils.c
index 6483b4122c..e8f6b0a1b9 100644
--- a/e-util/e-xml-utils.c
+++ b/e-util/e-xml-utils.c
@@ -699,8 +699,8 @@ e_xml_save_file (const char *filename, xmlDocPtr doc)
size_t n, written = 0;
xmlBufferPtr buf;
int errnosave;
+ int ret, fd;
ssize_t w;
- int fd;
filesave = alloca (strlen (filename) + 5);
slash = strrchr (filename, '/');
@@ -742,9 +742,10 @@ e_xml_save_file (const char *filename, xmlDocPtr doc)
return -1;
}
- close (fd);
+ while ((ret = close (fd)) == -1 && errno == EINTR)
+ ;
- if (errno != 0)
+ if (ret == -1)
return -1;
if (rename (filesave, filename) == -1) {