From c58f9a3991addbc6df1e75d8df0d80bfa145efa6 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Mon, 12 Jan 2009 19:25:41 +0300 Subject: [PATCH] comment --- .../com/intellij/openapi/application/impl/Win32Restarter.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform-impl/src/com/intellij/openapi/application/impl/Win32Restarter.java b/platform-impl/src/com/intellij/openapi/application/impl/Win32Restarter.java index 3a38ee2a6d43..20cdab13528e 100644 --- a/platform-impl/src/com/intellij/openapi/application/impl/Win32Restarter.java +++ b/platform-impl/src/com/intellij/openapi/application/impl/Win32Restarter.java @@ -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); }