Mercurial > hg > graal-jvmci-8
comparison src/share/vm/utilities/vmError.cpp @ 20781:42f27b59c550
Merge
author | asaha |
---|---|
date | Wed, 26 Nov 2014 08:57:40 -0800 |
parents | 417e3b8d04c5 d7b6bdd51abe |
children | 7848fc12602b f3ffb37f88a6 9989538b7507 |
comparison
equal
deleted
inserted
replaced
20771:9fa3bf3043a2 | 20781:42f27b59c550 |
---|---|
20 * or visit www.oracle.com if you need additional information or have any | 20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. | 21 * questions. |
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 #include <fcntl.h> | |
25 #include "precompiled.hpp" | 26 #include "precompiled.hpp" |
26 #include "compiler/compileBroker.hpp" | 27 #include "compiler/compileBroker.hpp" |
27 #include "gc_interface/collectedHeap.hpp" | 28 #include "gc_interface/collectedHeap.hpp" |
28 #include "prims/whitebox.hpp" | 29 #include "prims/whitebox.hpp" |
29 #include "runtime/arguments.hpp" | 30 #include "runtime/arguments.hpp" |
839 | 840 |
840 /** Expand a pattern into a buffer starting at pos and open a file using constructed path */ | 841 /** Expand a pattern into a buffer starting at pos and open a file using constructed path */ |
841 static int expand_and_open(const char* pattern, char* buf, size_t buflen, size_t pos) { | 842 static int expand_and_open(const char* pattern, char* buf, size_t buflen, size_t pos) { |
842 int fd = -1; | 843 int fd = -1; |
843 if (Arguments::copy_expand_pid(pattern, strlen(pattern), &buf[pos], buflen - pos)) { | 844 if (Arguments::copy_expand_pid(pattern, strlen(pattern), &buf[pos], buflen - pos)) { |
844 fd = open(buf, O_RDWR | O_CREAT | O_TRUNC, 0666); | 845 // the O_EXCL flag will cause the open to fail if the file exists |
846 fd = open(buf, O_RDWR | O_CREAT | O_EXCL, 0666); | |
845 } | 847 } |
846 return fd; | 848 return fd; |
847 } | 849 } |
848 | 850 |
849 /** | 851 /** |