Mercurial > hg > truffle
comparison src/os/solaris/vm/os_solaris.cpp @ 8067:5cd2fac2ae70
6749267: Signal handler should save/restore errno
Summary: Save errno before processing signal, then restore it.
Reviewed-by: acorn, sspitsyn
author | hseigel |
---|---|
date | Tue, 19 Feb 2013 08:51:56 -0500 |
parents | b5e3ec9c69fa |
children | 5fc51c1ecdeb 6b803ba47588 ca9580859cf4 |
comparison
equal
deleted
inserted
replaced
8066:b5e3ec9c69fa | 8067:5cd2fac2ae70 |
---|---|
4315 JVM_handle_solaris_signal(int signo, siginfo_t* siginfo, void* ucontext, | 4315 JVM_handle_solaris_signal(int signo, siginfo_t* siginfo, void* ucontext, |
4316 int abort_if_unrecognized); | 4316 int abort_if_unrecognized); |
4317 | 4317 |
4318 | 4318 |
4319 void signalHandler(int sig, siginfo_t* info, void* ucVoid) { | 4319 void signalHandler(int sig, siginfo_t* info, void* ucVoid) { |
4320 int orig_errno = errno; // Preserve errno value over signal handler. | |
4320 JVM_handle_solaris_signal(sig, info, ucVoid, true); | 4321 JVM_handle_solaris_signal(sig, info, ucVoid, true); |
4322 errno = orig_errno; | |
4321 } | 4323 } |
4322 | 4324 |
4323 /* Do not delete - if guarantee is ever removed, a signal handler (even empty) | 4325 /* Do not delete - if guarantee is ever removed, a signal handler (even empty) |
4324 is needed to provoke threads blocked on IO to return an EINTR | 4326 is needed to provoke threads blocked on IO to return an EINTR |
4325 Note: this explicitly does NOT call JVM_handle_solaris_signal and | 4327 Note: this explicitly does NOT call JVM_handle_solaris_signal and |