in deploy-runner-agent/src/main/java/jetbrains/buildServer/deployer/agent/SyncBuildProcessAdapter.java [62:77]
public void start() throws RunBuildException {
try {
runningThread.set(Thread.currentThread());
statusCode = runProcess();
hasFinished = true;
} catch (UploadInterruptedException e) {
hasFinished = false;
} catch (InterruptedException | ClosedByInterruptException ie) {
hasFinished = false;
if (!isInterrupted) { // clears interrupted state if any left
Thread.currentThread().interrupt();
}
} finally {
runningThread.set(null);
}
}