#ifdef __linux__ /* Also defined in net/linux_close.c */ #define INTERRUPT_SIGNAL (SIGRTMAX - 2) #elifdefined(_AIX) /* Also defined in net/aix_close.c */ #define INTERRUPT_SIGNAL (SIGRTMAX - 1) #elifdefined(_ALLBSD_SOURCE) /* Also defined in net/bsd_close.c */ #define INTERRUPT_SIGNAL SIGIO #else #error"missing platform-specific definition here" #endif
staticvoid
nullHandler(int sig)
{
}
JNIEXPORT void JNICALL
Java_sun_nio_ch_NativeThread_init(JNIEnv *env, jclass cl)
{ /* Install the null handler for INTERRUPT_SIGNAL. This might overwrite the *handlerpreviouslyinstalledby<platform>_close.c,butthat'sokay *sinceneitherhandleractuallydoesanything.Weinstallourown *handlerheresimplyoutofparanoia;ultimatelythetwomechanisms *shouldsomehowbeunified,perhapswithintheVM.
*/
struct sigaction sa, osa;
sa.sa_handler = nullHandler;
sa.sa_flags = 0;
sigemptyset(&sa.sa_mask); if (sigaction(INTERRUPT_SIGNAL, &sa, &osa) < 0)
JNU_ThrowIOExceptionWithLastError(env, "sigaction");
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.