mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 09:08:20 +00:00
Add more error handling for close() calls.
This commit is contained in:
parent
d872b1d9f6
commit
734e5f68d3
7 changed files with 47 additions and 19 deletions
|
@ -297,6 +297,9 @@ inline size_t pad_size(size_t size)
|
|||
// thread-safe as long as no two threads write to the same descriptor.
|
||||
extern bool safe_write(int fd, const char* data, int len);
|
||||
|
||||
// Wraps close(2) to emit error messages and abort on unrecoverable errors.
|
||||
extern void safe_close(int fd);
|
||||
|
||||
extern void out_of_memory(const char* where);
|
||||
|
||||
inline void* safe_realloc(void* ptr, size_t size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue