diff options
Diffstat (limited to 'cache.c')
-rw-r--r-- | cache.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cache.c b/cache.c index 2c70be7..580c0e8 100644 --- a/cache.c +++ b/cache.c | |||
@@ -265,6 +265,13 @@ static int process_slot(struct cache_slot *slot) | |||
265 | { | 265 | { |
266 | int err; | 266 | int err; |
267 | 267 | ||
268 | /* | ||
269 | * Make sure any buffered data is flushed before we redirect, | ||
270 | * do sendfile(2) or write(2) | ||
271 | */ | ||
272 | if (fflush(stdout)) | ||
273 | return errno; | ||
274 | |||
268 | err = open_slot(slot); | 275 | err = open_slot(slot); |
269 | if (!err && slot->match) { | 276 | if (!err && slot->match) { |
270 | if (is_expired(slot)) { | 277 | if (is_expired(slot)) { |