IKVM11  11
Java SE 11 Virtual Machine for .NET
Loading...
Searching...
No Matches
IKVM.Java.Externs.sun.misc.Signal Class Reference

Static Public Member Functions

static int findSignal (string sigName)
 
static long handle0 (int sig, long nativeH)
 
static void raise0 (int sig)
 

Detailed Description

Definition at line 37 of file Signal.cs.

Member Function Documentation

◆ findSignal()

static int IKVM.Java.Externs.sun.misc.Signal.findSignal ( string sigName)
static

Definition at line 130 of file Signal.cs.

131 {
132 if (Environment.OSVersion.Platform == PlatformID.Win32NT)
133 {
134 switch (sigName)
135 {
136 case "ABRT": /* abnormal termination triggered by abort cl */
137 return SIGABRT;
138 case "FPE": /* floating point exception */
139 return SIGFPE;
140 case "SEGV": /* segment violation */
141 return SIGSEGV;
142 case "INT": /* interrupt */
143 return SIGINT;
144 case "TERM": /* software term signal from kill */
145 return SIGTERM;
146 case "BREAK": /* Ctrl-Break sequence */
147 return SIGBREAK;
148 case "ILL": /* illegal instruction */
149 return SIGILL;
150 }
151 }
152 return -1;
153 }

◆ handle0()

static long IKVM.Java.Externs.sun.misc.Signal.handle0 ( int sig,
long nativeH )
static

Definition at line 163 of file Signal.cs.

164 {
165 long oldHandler;
166 handler.TryGetValue(sig, out oldHandler);
167 switch (nativeH)
168 {
169 case 0: // Default Signal Handler
170 if (defaultConsoleCtrlDelegate == null && Environment.OSVersion.Platform == PlatformID.Win32NT)
171 {
172 try
173 {
174 RegisterCriticalCtrlHandler();
175 }
176 catch (SecurityException)
177 {
178 }
179 }
180 break;
181 case 1: // Ignore Signal
182 break;
183 case 2: // Custom Signal Handler
184 switch (sig)
185 {
186 case SIGBREAK:
187 case SIGFPE:
188 return -1;
189 }
190 break;
191 }
192 handler[sig] = nativeH;
193 return oldHandler;
194 }

◆ raise0()

static void IKVM.Java.Externs.sun.misc.Signal.raise0 ( int sig)
static

Definition at line 196 of file Signal.cs.

197 {
198#if !FIRST_PASS
199 global::java.security.AccessController.doPrivileged(global::ikvm.runtime.Delegates.toPrivilegedAction(delegate
200 {
201 global::java.lang.Class clazz = typeof(global::sun.misc.Signal);
202 global::java.lang.reflect.Method dispatch = clazz.getDeclaredMethod("dispatch", global::java.lang.Integer.TYPE);
203 dispatch.setAccessible(true);
204 dispatch.invoke(null, global::java.lang.Integer.valueOf(sig));
205 return null;
206 }));
207#endif
208 }

The documentation for this class was generated from the following file: