diff options
author | Matt Johnston <matt@ucc.asn.au> | 2014-01-28 22:44:24 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2014-01-28 22:44:24 +0800 |
commit | af524c4d6534f32f945698a3e53e14cd38f923fb (patch) | |
tree | d65669b0c07dba22d5733ba85ce54c7a4cc2e4eb /gensignkey.c | |
parent | 2bc9f3505289c77a02f564de8cc53ef73868e40e (diff) |
Fix check for EINTR
Diffstat (limited to 'gensignkey.c')
-rw-r--r-- | gensignkey.c | 2 |
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) { |