diff options
Diffstat (limited to '')
| -rw-r--r-- | source/html.c | 6 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 5 insertions, 1 deletion
diff --git a/source/html.c b/source/html.c index ef74bb3..367cea7 100644 --- a/source/html.c +++ b/source/html.c @@ -65,7 +65,11 @@ static void write_out(const char *data, size_t size) while (size) { ssize_t written = xwrite(STDOUT_FILENO, data, size); - if (written < 0) + // A write that moves nothing would repeat for ever, so it + // counts as a full device, the way write_in_full treats it. + if (!written) + errno = ENOSPC; + if (written <= 0) break; data += written; size -= written; |
