PY-8414 (don't restart file watcher on hangup signal)

This commit is contained in:
Roman Shevchenko
2013-01-07 16:10:01 +01:00
parent 9088ab98fe
commit 6d5230ff1b
@@ -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);