--- a/hotspot/src/os/windows/vm/os_windows.cpp Tue Dec 01 21:08:00 2015 +0100
+++ b/hotspot/src/os/windows/vm/os_windows.cpp Tue Dec 01 21:30:34 2015 -0500
@@ -6033,3 +6033,36 @@
UseNUMAInterleaving = old_use_numa_interleaving;
}
#endif // PRODUCT
+
+/*
+ All the defined signal names for Windows.
+
+ NOTE that not all of these names are accepted by FindSignal!
+
+ For various reasons some of these may be rejected at runtime.
+
+ Here are the names currently accepted by a user of sun.misc.Signal with
+ 1.4.1 (ignoring potential interaction with use of chaining, etc):
+
+ (LIST TBD)
+
+*/
+int os::get_signal_number(const char* name) {
+ static const struct {
+ char* name;
+ int number;
+ } siglabels [] =
+ // derived from version 6.0 VC98/include/signal.h
+ {"ABRT", SIGABRT, // abnormal termination triggered by abort cl
+ "FPE", SIGFPE, // floating point exception
+ "SEGV", SIGSEGV, // segment violation
+ "INT", SIGINT, // interrupt
+ "TERM", SIGTERM, // software term signal from kill
+ "BREAK", SIGBREAK, // Ctrl-Break sequence
+ "ILL", SIGILL}; // illegal instruction
+ for(int i=0;i<sizeof(siglabels)/sizeof(struct siglabel);i++)
+ if(!strcmp(name, siglabels[i].name))
+ return siglabels[i].number;
+ return -1;
+}
+