87 os::signal_raise(sig); |
87 os::signal_raise(sig); |
88 return JNI_TRUE; |
88 return JNI_TRUE; |
89 JVM_END |
89 JVM_END |
90 |
90 |
91 |
91 |
92 /* |
|
93 All the defined signal names for Windows. |
|
94 |
|
95 NOTE that not all of these names are accepted by FindSignal! |
|
96 |
|
97 For various reasons some of these may be rejected at runtime. |
|
98 |
|
99 Here are the names currently accepted by a user of sun.misc.Signal with |
|
100 1.4.1 (ignoring potential interaction with use of chaining, etc): |
|
101 |
|
102 (LIST TBD) |
|
103 |
|
104 */ |
|
105 struct siglabel { |
|
106 char *name; |
|
107 int number; |
|
108 }; |
|
109 |
|
110 struct siglabel siglabels[] = |
|
111 /* derived from version 6.0 VC98/include/signal.h */ |
|
112 {"ABRT", SIGABRT, /* abnormal termination triggered by abort cl */ |
|
113 "FPE", SIGFPE, /* floating point exception */ |
|
114 "SEGV", SIGSEGV, /* segment violation */ |
|
115 "INT", SIGINT, /* interrupt */ |
|
116 "TERM", SIGTERM, /* software term signal from kill */ |
|
117 "BREAK", SIGBREAK, /* Ctrl-Break sequence */ |
|
118 "ILL", SIGILL}; /* illegal instruction */ |
|
119 |
|
120 JVM_ENTRY_NO_ENV(jint, JVM_FindSignal(const char *name)) |
|
121 /* find and return the named signal's number */ |
|
122 |
|
123 for(int i=0;i<sizeof(siglabels)/sizeof(struct siglabel);i++) |
|
124 if(!strcmp(name, siglabels[i].name)) |
|
125 return siglabels[i].number; |
|
126 return -1; |
|
127 JVM_END |
|