src/share/vm/utilities/vmError.cpp

changeset 7711
fb677d6aebea
parent 7710
b1cf34d57e78
child 7712
9a227eaac2dc
     1.1 --- a/src/share/vm/utilities/vmError.cpp	Thu Nov 06 09:39:49 2014 -0800
     1.2 +++ b/src/share/vm/utilities/vmError.cpp	Mon Nov 10 09:47:41 2014 -0800
     1.3 @@ -22,7 +22,6 @@
     1.4   *
     1.5   */
     1.6  
     1.7 -#include <fcntl.h>
     1.8  #include "precompiled.hpp"
     1.9  #include "compiler/compileBroker.hpp"
    1.10  #include "gc_interface/collectedHeap.hpp"
    1.11 @@ -842,8 +841,7 @@
    1.12  static int expand_and_open(const char* pattern, char* buf, size_t buflen, size_t pos) {
    1.13    int fd = -1;
    1.14    if (Arguments::copy_expand_pid(pattern, strlen(pattern), &buf[pos], buflen - pos)) {
    1.15 -    // the O_EXCL flag will cause the open to fail if the file exists
    1.16 -    fd = open(buf, O_RDWR | O_CREAT | O_EXCL, 0666);
    1.17 +    fd = open(buf, O_RDWR | O_CREAT | O_TRUNC, 0666);
    1.18    }
    1.19    return fd;
    1.20  }

mercurial