synchronized void launchAndAccept()

in src/main/java/com/jetbrains/jdi/AbstractLauncher.java [198:226]


        synchronized void launchAndAccept() throws
                                IOException, VMStartException {

            process = Runtime.getRuntime().exec(commandArray);

            Thread acceptingThread = acceptConnection();
            Thread monitoringThread = monitorTarget();
            try {
                while ((connection == null) &&
                       (acceptException == null) &&
                       !exited) {
                    wait();
                }

                if (exited) {
                    throw new VMStartException(
                        "VM initialization failed for: " + commandString(), process);
                }
                if (acceptException != null) {
                    // Rethrow the exception in this thread
                    throw acceptException;
                }
            } catch (InterruptedException e) {
                throw new InterruptedIOException("Interrupted during accept");
            } finally {
                acceptingThread.interrupt();
                monitoringThread.interrupt();
            }
        }