Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/ikvm-fork.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjfrijters <jfrijters>2005-01-03 11:26:21 +0300
committerjfrijters <jfrijters>2005-01-03 11:26:21 +0300
commit1b65938abfd34235a8568dcf2805766ed709239e (patch)
treec6b026f7e3059af3136efea0cf2ee173b6c4e5e4 /classpath/java/lang/VMRuntime.java
parent4f63f7e13de0ade812727063448c93d5e9244dcc (diff)
*** empty log message ***
Diffstat (limited to 'classpath/java/lang/VMRuntime.java')
-rw-r--r--classpath/java/lang/VMRuntime.java19
1 files changed, 13 insertions, 6 deletions
diff --git a/classpath/java/lang/VMRuntime.java b/classpath/java/lang/VMRuntime.java
index 20c658b0..a1d5721a 100644
--- a/classpath/java/lang/VMRuntime.java
+++ b/classpath/java/lang/VMRuntime.java
@@ -39,9 +39,6 @@ import cli.System.Diagnostics.ProcessStartInfo;
*/
final class VMRuntime
{
- // HACK ikvm.exe sets this field to pass the properties set on the command line
- private static cli.System.Collections.Hashtable props;
-
/**
* No instance is ever created.
*/
@@ -49,7 +46,7 @@ final class VMRuntime
{
}
- static
+ static void enableShutdownHooks()
{
cli.System.AppDomain.get_CurrentDomain().add_ProcessExit(new cli.System.EventHandler(new cli.System.EventHandler.Method() {
public void Invoke(Object sender, cli.System.EventArgs e) {
@@ -311,8 +308,18 @@ final class VMRuntime
public int waitFor() throws InterruptedException
{
- proc.WaitForExit();
- return proc.get_ExitCode();
+ // to be interruptable we have to use polling
+ for(;;)
+ {
+ if(Thread.interrupted())
+ {
+ throw new InterruptedException();
+ }
+ if(proc.WaitForExit(100))
+ {
+ return proc.get_ExitCode();
+ }
+ }
}
public int exitValue()