Add O_APPEND to flags (#45)

This commit is contained in:
Thomas Krajacic authored and Johannes Weiss committed 2019-02-19 11:44:24 +00:00
1 parent 32e9fa5158
commit 5c135cd948
1 file changed
+1 -1
@@ -53,7 +53,7 @@ private class FileHandler {
init() {
self.path = "/tmp/log-\(UUID().uuidString).txt"
self.fd = open(self.path, O_WRONLY | O_CREAT, 0o666)
self.fd = open(self.path, O_WRONLY | O_CREAT | O_APPEND, 0o666)
assert(self.fd > 0, "could not open \(self.path)")
print("writing logs to \(self.path)")
}