src/vs/workbench/contrib/terminal/electron-sandbox/terminalNativeContribution.ts/TerminalNativeContribution/_whenFileDeleted
class TerminalNativeContribution:	private _whenFileDeleted(path: URI): Promise<void> {
		// Complete when wait marker file is deleted
		return new Promise<void>(resolve => {
			let running = false;
			const interval = setInterval(async () => {
				if (!running) {
					running = true;
					const exists = await this._fileService.exists(path);
					running = false;

					if (!exists) {
						clearInterval(interval);
						resolve(undefined);
					}
				}
			}, 1000);
		});
	}