src/hotspot/share/utilities/vmError.cpp
changeset 54881 80991d58b947
parent 54845 63ba0b902181
child 54897 2e5e9d31a6c5
--- a/src/hotspot/share/utilities/vmError.cpp	Wed May 15 11:53:47 2019 +0200
+++ b/src/hotspot/share/utilities/vmError.cpp	Wed May 15 14:30:22 2019 +0200
@@ -1198,7 +1198,7 @@
 static int expand_and_open(const char* pattern, char* buf, size_t buflen, size_t pos) {
   int fd = -1;
   if (Arguments::copy_expand_pid(pattern, strlen(pattern), &buf[pos], buflen - pos)) {
-    fd = open(buf, O_RDWR | O_CREAT, 0666);
+    fd = open(buf, O_RDWR | O_CREAT | O_TRUNC, 0666);
   }
   return fd;
 }