Skip to content

Commit

Permalink
[Thirdparty][glog][bug] convert init be log file length use fopen fun…
Browse files Browse the repository at this point in the history
…ction (apache#3649)
  • Loading branch information
songenjie authored May 26, 2020
1 parent fb66bac commit 12c59ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thirdparty/patches/glog-0.3.3-for-palo2.patch
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@
+ // Mark the file close-on-exec. We don't really care if this fails
+ fcntl(fd, F_SETFD, FD_CLOEXEC);
+#endif
+ file_ = fdopen(fd, "ra"); // Read and append a FILE*.
+ file_ = fopen(filename, "a+"); // Read and append a FILE*.
+ if (file_ == NULL) { // Man, we're screwed!, try to create new log file
+ close(fd);
+ }
Expand Down

0 comments on commit 12c59ba

Please sign in to comment.