Mercurial > hg > truffle
comparison src/share/vm/utilities/vmError.cpp @ 21820:fb677d6aebea
8062675: jmap is unable to display information about java processes and prints only pids
Summary: backout fix 8050808 which caused this regression and as requested.
Reviewed-by: hseigel
author | asaha |
---|---|
date | Mon, 10 Nov 2014 09:47:41 -0800 |
parents | b1cf34d57e78 |
children | 9a227eaac2dc |
comparison
equal
deleted
inserted
replaced
21819:b1cf34d57e78 | 21820:fb677d6aebea |
---|---|
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> | |
26 #include "precompiled.hpp" | 25 #include "precompiled.hpp" |
27 #include "compiler/compileBroker.hpp" | 26 #include "compiler/compileBroker.hpp" |
28 #include "gc_interface/collectedHeap.hpp" | 27 #include "gc_interface/collectedHeap.hpp" |
29 #include "prims/whitebox.hpp" | 28 #include "prims/whitebox.hpp" |
30 #include "runtime/arguments.hpp" | 29 #include "runtime/arguments.hpp" |
840 | 839 |
841 /** Expand a pattern into a buffer starting at pos and open a file using constructed path */ | 840 /** Expand a pattern into a buffer starting at pos and open a file using constructed path */ |
842 static int expand_and_open(const char* pattern, char* buf, size_t buflen, size_t pos) { | 841 static int expand_and_open(const char* pattern, char* buf, size_t buflen, size_t pos) { |
843 int fd = -1; | 842 int fd = -1; |
844 if (Arguments::copy_expand_pid(pattern, strlen(pattern), &buf[pos], buflen - pos)) { | 843 if (Arguments::copy_expand_pid(pattern, strlen(pattern), &buf[pos], buflen - pos)) { |
845 // the O_EXCL flag will cause the open to fail if the file exists | 844 fd = open(buf, O_RDWR | O_CREAT | O_TRUNC, 0666); |
846 fd = open(buf, O_RDWR | O_CREAT | O_EXCL, 0666); | |
847 } | 845 } |
848 return fd; | 846 return fd; |
849 } | 847 } |
850 | 848 |
851 /** | 849 /** |