diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/FileWatcher.java b/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/FileWatcher.java index 8fa592866b1e..fed93b9e42ba 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/FileWatcher.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/FileWatcher.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -183,7 +183,13 @@ public class FileWatcher { } private void startupProcess(final boolean restart) throws IOException { - if (myIsShuttingDown) return; + if (myIsShuttingDown) { + return; + } + if (ShutDownTracker.isShutdownHookRunning()) { + myIsShuttingDown = true; + return; + } if (myStartAttemptCount++ > MAX_PROCESS_LAUNCH_ATTEMPT_COUNT) { notifyOnFailure(ApplicationBundle.message("watcher.failed.to.start"), null);