]> git.sesse.net Git - cubemap/blobdiff - util.h
Support UDP packets larger than 4 kB.
[cubemap] / util.h
diff --git a/util.h b/util.h
index f64e25795d5dec79b662519f6a4d319be0f9562d..d1670750d522f36ec7032736530516b10d59b894 100644 (file)
--- a/util.h
+++ b/util.h
 int make_tempfile(const std::string &contents);
 
 // Opposite of make_tempfile(). Returns false on failure.
+bool read_tempfile_and_close(int fd, std::string *contents);
+
+// Same as read_tempfile_and_close(), without the close.
 bool read_tempfile(int fd, std::string *contents);
 
+// Close a file descriptor, taking care of EINTR on the way.
+// log_perror() if it fails; apart from that, behaves as close().
+int safe_close(int fd);
+
 #endif  // !defined(_UTIL_H