mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
Merge branch 'fsync-shadow-files-before-rename' of https://github.com/awelzel/zeek
* 'fsync-shadow-files-before-rename' of https://github.com/awelzel/zeek: logging/writers/ascii: shadow files: Add fsync() before rename()
This commit is contained in:
commit
1b3b9a3cfc
5 changed files with 45 additions and 3 deletions
|
@ -461,6 +461,10 @@ extern bool safe_write(int fd, const char* data, int len);
|
|||
// Same as safe_write(), but for pwrite().
|
||||
extern bool safe_pwrite(int fd, const unsigned char* data, size_t len, size_t offset);
|
||||
|
||||
// Like fsync() but handles interrupted system calls by retrying and
|
||||
// aborts on unrecoverable errors.
|
||||
extern bool safe_fsync(int fd);
|
||||
|
||||
// Wraps close(2) to emit error messages and abort on unrecoverable errors.
|
||||
extern void safe_close(int fd);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue