summaryrefslogtreecommitdiffhomepage
path: root/gensignkey.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2014-01-28 22:44:24 +0800
committerMatt Johnston <matt@ucc.asn.au>2014-01-28 22:44:24 +0800
commitaf524c4d6534f32f945698a3e53e14cd38f923fb (patch)
treed65669b0c07dba22d5733ba85ce54c7a4cc2e4eb /gensignkey.c
parent2bc9f3505289c77a02f564de8cc53ef73868e40e (diff)
Fix check for EINTR
Diffstat (limited to 'gensignkey.c')
-rw-r--r--gensignkey.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gensignkey.c b/gensignkey.c
index cb66fff..338bbef 100644
--- a/gensignkey.c
+++ b/gensignkey.c
@@ -26,7 +26,7 @@ static int buf_writefile(buffer * buf, const char * filename) {
while (buf->pos != buf->len) {
int len = write(fd, buf_getptr(buf, buf->len - buf->pos),
buf->len - buf->pos);
- if (errno == EINTR) {
+ if (len == -1 && errno == EINTR) {
continue;
}
if (len <= 0) {