using namespace fileutil_detail;
+int openNoInt(const char* name, int flags, mode_t mode) {
+ return wrapNoInt(open, name, flags, mode);
+}
+
int closeNoInt(int fd) {
int r = close(fd);
// Ignore EINTR. On Linux, close() may only return EINTR after the file
return wrapNoInt(fdatasync, fd);
}
+int ftruncateNoInt(int fd, off_t len) {
+ return wrapNoInt(ftruncate, fd, len);
+}
+
+int truncateNoInt(const char* path, off_t len) {
+ return wrapNoInt(truncate, path, len);
+}
+
ssize_t readNoInt(int fd, void* buf, size_t count) {
return wrapNoInt(read, fd, buf, count);
}
#include "folly/Portability.h"
+#include <sys/stat.h>
+#include <sys/types.h>
#include <sys/uio.h>
+#include <fcntl.h>
#include <unistd.h>
namespace folly {
* until all data is written. Note that *Full wrappers weaken the thread
* semantics of underlying system calls.
*/
+int openNoInt(const char* name, int flags, mode_t mode=0644);
int closeNoInt(int fd);
int fsyncNoInt(int fd);
int fdatasyncNoInt(int fd);
+int ftruncateNoInt(int fd, off_t len);
+int truncateNoInt(const char* path, off_t len);
ssize_t readNoInt(int fd, void* buf, size_t n);
ssize_t preadNoInt(int fd, void* buf, size_t n, off_t offset);