diff src/os/linux/vm/attachListener_linux.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 f95d63e2154a
children 2e8f19c2feef
line wrap: on
line diff
--- a/src/os/linux/vm/attachListener_linux.cpp	Thu Jun 13 11:16:38 2013 -0700
+++ b/src/os/linux/vm/attachListener_linux.cpp	Fri Jun 14 07:46:22 2013 -0700
@@ -199,7 +199,7 @@
   ::unlink(initial_path);
   int res = ::bind(listener, (struct sockaddr*)&addr, sizeof(addr));
   if (res == -1) {
-    RESTARTABLE(::close(listener), res);
+    ::close(listener);
     return -1;
   }
 
@@ -212,7 +212,7 @@
       }
   }
   if (res == -1) {
-    RESTARTABLE(::close(listener), res);
+    ::close(listener);
     ::unlink(initial_path);
     return -1;
   }
@@ -340,24 +340,21 @@
     struct ucred cred_info;
     socklen_t optlen = sizeof(cred_info);
     if (::getsockopt(s, SOL_SOCKET, SO_PEERCRED, (void*)&cred_info, &optlen) == -1) {
-      int res;
-      RESTARTABLE(::close(s), res);
+      ::close(s);
       continue;
     }
     uid_t euid = geteuid();
     gid_t egid = getegid();
 
     if (cred_info.uid != euid || cred_info.gid != egid) {
-      int res;
-      RESTARTABLE(::close(s), res);
+      ::close(s);
       continue;
     }
 
     // peer credential look okay so we read the request
     LinuxAttachOperation* op = read_request(s);
     if (op == NULL) {
-      int res;
-      RESTARTABLE(::close(s), res);
+      ::close(s);
       continue;
     } else {
       return op;
@@ -408,7 +405,7 @@
   }
 
   // done
-  RESTARTABLE(::close(this->socket()), rc);
+  ::close(this->socket());
 
   // were we externally suspended while we were waiting?
   thread->check_and_wait_while_suspended();