hotspot/src/share/vm/services/heapDumper.cpp
changeset 37113 5a33bf5089ac
parent 36375 d96a3220c7bb
child 37248 11a660dbbb8e
equal deleted inserted replaced
37111:98572401ab0a 37113:5a33bf5089ac
   457   _dump_start = (jlong)-1;
   457   _dump_start = (jlong)-1;
   458   _fd = os::create_binary_file(path, false);    // don't replace existing file
   458   _fd = os::create_binary_file(path, false);    // don't replace existing file
   459 
   459 
   460   // if the open failed we record the error
   460   // if the open failed we record the error
   461   if (_fd < 0) {
   461   if (_fd < 0) {
   462     _error = (char*)os::strdup(strerror(errno));
   462     _error = (char*)os::strdup(os::strerror(errno));
   463   }
   463   }
   464 }
   464 }
   465 
   465 
   466 DumpWriter::~DumpWriter() {
   466 DumpWriter::~DumpWriter() {
   467   // flush and close dump file
   467   // flush and close dump file
   507       uint tmp = (uint)MIN2(len, (size_t)UINT_MAX);
   507       uint tmp = (uint)MIN2(len, (size_t)UINT_MAX);
   508       n = os::write(file_descriptor(), pos, tmp);
   508       n = os::write(file_descriptor(), pos, tmp);
   509 
   509 
   510       if (n < 0) {
   510       if (n < 0) {
   511         // EINTR cannot happen here, os::write will take care of that
   511         // EINTR cannot happen here, os::write will take care of that
   512         set_error(strerror(errno));
   512         set_error(os::strerror(errno));
   513         os::close(file_descriptor());
   513         os::close(file_descriptor());
   514         set_file_descriptor(-1);
   514         set_file_descriptor(-1);
   515         return;
   515         return;
   516       }
   516       }
   517 
   517