|
|
|
@ -481,8 +481,12 @@ static chunk *chunkqueue_get_append_tempfile(chunkqueue *cq) {
|
|
|
|
|
return NULL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (0 != fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_APPEND)) { |
|
|
|
|
close(fd); |
|
|
|
|
buffer_free(template); |
|
|
|
|
return NULL; |
|
|
|
|
} |
|
|
|
|
fd_close_on_exec(fd); |
|
|
|
|
(void)fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_APPEND); |
|
|
|
|
|
|
|
|
|
c = chunkqueue_get_unused_chunk(cq); |
|
|
|
|
c->type = FILE_CHUNK; |
|
|
|
|