comment
authorDmitry Jemerov <yole@intellij.com>
Mon, 12 Jan 2009 16:25:41 +0000 (19:25 +0300)
committerDmitry Jemerov <yole@intellij.com>
Mon, 12 Jan 2009 16:25:41 +0000 (19:25 +0300)
platform-impl/src/com/intellij/openapi/application/impl/Win32Restarter.java

index 3a38ee2a6d43048cae0b38551c64d1e39cd85c0d..20cdab13528eea8aa84dbf914759727239437310 100644 (file)
@@ -28,6 +28,10 @@ public class Win32Restarter {
       Messages.showMessageDialog("Restart failed: " + ex.getMessage(), "Restart", Messages.getErrorIcon());
       return;
     }
+
+    // Since the process ID is passed through the command line, we want to make sure that we don't exit before the "restarter"
+    // process has a chance to open the handle to our process, and that it doesn't wait for the termination of an unrelated
+    // process which happened to have the same process ID.
     try {
       Thread.sleep(500);
     }