Merge
authorcoleenp
Tue, 19 Feb 2013 13:33:39 -0500
changeset 15745 fc43fd9458ce
parent 15743 f708934a12e7 (diff)
parent 15744 fd58c7e770b3 (current diff)
child 15746 27b079111563
child 15793 4867678e3517
child 15794 af92b7196818
Merge
--- a/hotspot/src/os/bsd/vm/os_bsd.cpp	Tue Feb 19 11:36:52 2013 -0500
+++ b/hotspot/src/os/bsd/vm/os_bsd.cpp	Tue Feb 19 13:33:39 2013 -0500
@@ -2887,7 +2887,9 @@
 
 void signalHandler(int sig, siginfo_t* info, void* uc) {
   assert(info != NULL && uc != NULL, "it must be old kernel");
+  int orig_errno = errno;  // Preserve errno value over signal handler.
   JVM_handle_bsd_signal(sig, info, uc, true);
+  errno = orig_errno;
 }
 
 
--- a/hotspot/src/os/linux/vm/os_linux.cpp	Tue Feb 19 11:36:52 2013 -0500
+++ b/hotspot/src/os/linux/vm/os_linux.cpp	Tue Feb 19 13:33:39 2013 -0500
@@ -3653,7 +3653,9 @@
 
 void signalHandler(int sig, siginfo_t* info, void* uc) {
   assert(info != NULL && uc != NULL, "it must be old kernel");
+  int orig_errno = errno;  // Preserve errno value over signal handler.
   JVM_handle_linux_signal(sig, info, uc, true);
+  errno = orig_errno;
 }
 
 
--- a/hotspot/src/os/solaris/vm/os_solaris.cpp	Tue Feb 19 11:36:52 2013 -0500
+++ b/hotspot/src/os/solaris/vm/os_solaris.cpp	Tue Feb 19 13:33:39 2013 -0500
@@ -4317,7 +4317,9 @@
 
 
 void signalHandler(int sig, siginfo_t* info, void* ucVoid) {
+  int orig_errno = errno;  // Preserve errno value over signal handler.
   JVM_handle_solaris_signal(sig, info, ucVoid, true);
+  errno = orig_errno;
 }
 
 /* Do not delete - if guarantee is ever removed,  a signal handler (even empty)