diff src/os/solaris/vm/perfMemory_solaris.cpp @ 10978:e95fc50106cf

7178026: os::close can restart ::close but that is not a restartable syscall Summary: Removed restart macros from all os:close calls on Solaris, Linux, MacOS X platforms. Reviewed-by: dcubed, dholmes
author rdurbin
date Fri, 14 Jun 2013 07:46:22 -0700
parents a837fa3d3f86
children 1f4355cee9a2
line wrap: on
line diff
--- a/src/os/solaris/vm/perfMemory_solaris.cpp	Thu Jun 13 11:16:38 2013 -0700
+++ b/src/os/solaris/vm/perfMemory_solaris.cpp	Fri Jun 14 07:46:22 2013 -0700
@@ -122,7 +122,7 @@
       addr += result;
     }
 
-    RESTARTABLE(::close(fd), result);
+    result = ::close(fd);
     if (PrintMiscellaneous && Verbose) {
       if (result == OS_ERR) {
         warning("Could not close %s: %s\n", destfile, strerror(errno));
@@ -437,7 +437,7 @@
       addr+=result;
     }
 
-    RESTARTABLE(::close(fd), result);
+    ::close(fd);
 
     // get the user name for the effective user id of the process
     char* user_name = get_user_name(psinfo.pr_euid);
@@ -669,7 +669,7 @@
     if (PrintMiscellaneous && Verbose) {
       warning("could not set shared memory file size: %s\n", strerror(errno));
     }
-    RESTARTABLE(::close(fd), result);
+    ::close(fd);
     return -1;
   }
 
@@ -749,9 +749,7 @@
 
   mapAddress = (char*)::mmap((char*)0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
 
-  // attempt to close the file - restart it if it was interrupted,
-  // but ignore other failures
-  RESTARTABLE(::close(fd), result);
+  result = ::close(fd);
   assert(result != OS_ERR, "could not close file");
 
   if (mapAddress == MAP_FAILED) {
@@ -922,9 +920,7 @@
 
   mapAddress = (char*)::mmap((char*)0, size, mmap_prot, MAP_SHARED, fd, 0);
 
-  // attempt to close the file - restart if it gets interrupted,
-  // but ignore other failures
-  RESTARTABLE(::close(fd), result);
+  result = ::close(fd);
   assert(result != OS_ERR, "could not close file");
 
   if (mapAddress == MAP_FAILED) {