26 #include <sys/types.h>
37 int msync(
void* addr,
size_t length,
bool async);
41 int open(
const char* path,
int flags,
int mode);
43 void close(
const int fd);
47 ::FILE*
popen(
const char* command,
const char*
type);
49 int32_t
pclose(::FILE* fh);
53 int32_t
ftruncate(
const int32_t fd, int64_t length);
57 int safe_open(
const char* path,
int flags, mode_t mode) noexcept;
59 int safe_fcntl(
int fd,
int cmd,
struct flock* fl) noexcept;
60 ssize_t
safe_read(
const int fd,
void* buffer,
const size_t buffer_size) noexcept;
61 ssize_t
safe_write(
const int fd,
const void* buffer,
const size_t buffer_size) noexcept;
int safe_open(const char *path, int flags, mode_t mode) noexcept
int32_t pclose(::FILE *fh)
::FILE * popen(const char *command, const char *type)
ssize_t safe_read(const int fd, void *buffer, const size_t buffer_size) noexcept
ssize_t safe_write(const int fd, const void *buffer, const size_t buffer_size) noexcept
future< Result > async(Fn &&fn, Args &&...args)
int open(const char *path, int flags, int mode)
::FILE * fopen(const char *filename, const char *mode)
int msync(void *addr, size_t length, bool async)
int32_t safe_ftruncate(const int32_t fd, int64_t length) noexcept
std::string filename(char const *path)
void checked_munmap(void *addr, size_t length)
int32_t ftruncate(const int32_t fd, int64_t length)
int safe_fcntl(int fd, int cmd, struct flock *fl) noexcept
int safe_close(int fd) noexcept
size_t file_size(const int fd)
void * checked_mmap(const int fd, const size_t sz)