public void close() {
        Exception taskKillException = null;
        if (WindowsUtils.thisIsWindows()) {
            if (!browserConfigurationOptions.is("honorSystemProxy")) {
                restoreSystemProxy();
            }
        }
        if (process == null) return;
        if (browserConfigurationOptions.is("killProcessesByName")) {
            WindowsUtils.tryToKillByName("iexplore.exe");
        }
        try { // DGF killableprocess.exe should commit suicide if we send it a newline
            process.getOutputStream().write('\n');
            process.getOutputStream().flush();
            Thread.sleep(200);
        } catch (Exception ignored) {}
        AsyncExecute.killProcess(process);
        if (customPACappropriate) {
            try {
                LauncherUtils.recursivelyDeleteDir(customProxyPACDir);
            } catch (RuntimeException e) {
                if (taskKillException != null) {
                    LOGGER.error("Couldn't delete custom IE proxy directory", e);
                    LOGGER.error("Perhaps IE proxy delete error was caused by this exception", taskKillException);
                    throw new RuntimeException("Couldn't delete custom IE " +
                            "proxy directory, presumably because task kill failed; " +
                            "see error log!", e);
                }
                throw e;
            }
        }
    }