comparison src/os/solaris/vm/attachListener_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 b9a9ed0f8eeb
children 2e8f19c2feef
comparison
equal deleted inserted replaced
10969:a837fa3d3f86 10978:e95fc50106cf
390 debug_only(warning("attempt to create %s failed", initial_path)); 390 debug_only(warning("attempt to create %s failed", initial_path));
391 ::door_revoke(dd); 391 ::door_revoke(dd);
392 return -1; 392 return -1;
393 } 393 }
394 assert(fd >= 0, "bad file descriptor"); 394 assert(fd >= 0, "bad file descriptor");
395 RESTARTABLE(::close(fd), res); 395 ::close(fd);
396 396
397 // attach the door descriptor to the file 397 // attach the door descriptor to the file
398 if ((res = ::fattach(dd, initial_path)) == -1) { 398 if ((res = ::fattach(dd, initial_path)) == -1) {
399 // if busy then detach and try again 399 // if busy then detach and try again
400 if (errno == EBUSY) { 400 if (errno == EBUSY) {
408 } 408 }
409 409
410 // rename file so that clients can attach 410 // rename file so that clients can attach
411 if (dd >= 0) { 411 if (dd >= 0) {
412 if (::rename(initial_path, door_path) == -1) { 412 if (::rename(initial_path, door_path) == -1) {
413 RESTARTABLE(::close(dd), res); 413 ::close(dd);
414 ::fdetach(initial_path); 414 ::fdetach(initial_path);
415 dd = -1; 415 dd = -1;
416 } 416 }
417 } 417 }
418 if (dd >= 0) { 418 if (dd >= 0) {
547 write_fully(this->socket(), (char*) st->base(), st->size()); 547 write_fully(this->socket(), (char*) st->base(), st->size());
548 ::shutdown(this->socket(), 2); 548 ::shutdown(this->socket(), 2);
549 } 549 }
550 550
551 // close socket and we're done 551 // close socket and we're done
552 RESTARTABLE(::close(this->socket()), rc); 552 ::close(this->socket());
553 553
554 // were we externally suspended while we were waiting? 554 // were we externally suspended while we were waiting?
555 thread->check_and_wait_while_suspended(); 555 thread->check_and_wait_while_suspended();
556 } 556 }
557 delete this; 557 delete this;