Examples of waitFor()


Examples of com.mucommander.process.AbstractProcess.waitFor()

            pout = new OutputStreamWriter(process.getOutputStream(), getScriptEncoding());
            pout.write(appleScript);
            pout.close();

            // Wait for the process to die
            int returnCode = process.waitFor();

            LOGGER.debug("osascript returned code="+returnCode+", output="+ outputBuffer);

            if(returnCode!=0) {
              LOGGER.debug("osascript terminated abnormally");
View Full Code Here

Examples of com.nativelibs4java.opencl.CLEvent.waitFor()

      // The same kernel can be safely used by different threads, as long as setArgs + enqueueNDRange are in a synchronized block
      synchronized (kernel) {
          //kernel.setArgs(b1,b2,b3);
          kernelCompletion = kernel.enqueueNDRange(queue, new int[] { A.length }, new int[] { 1 } );
      }
      kernelCompletion.waitFor(); // better not to wait for it but to pass it as a dependent event to some other queuable operation (CLBuffer.read, for instance)
     
      FloatBuffer f = b3.read(queue, kernelCompletion);
     
      for(int i=0;i<A.length;i++) {
        System.out.println( A[i] + " * " + B[i] + " = " + f.get(i));
View Full Code Here

Examples of com.nexirius.util.Semaphore.waitFor()

// replace variables first
        new PrecompilerThread(in, out1);
        VariableResolverThread vr = new VariableResolverThread(new PushbackInputStream(in1), out2);
        HTMLParserThread parser = new HTMLParserThread(sessionVariable, model, isEditor, inParser, out, semaphore);

        semaphore.waitFor();

        if (vr.getException() != null) {

            throw vr.getException();
        }
View Full Code Here

Examples of com.sun.enterprise.deployment.client.DeploymentFacility.waitFor()

                    targetNames = refList.toArray(new String[refList.size()]);
                else
                    targetNames=new String[]{"domain"};
            }
            progressObject = df.undeploy(df.createTargets(targetNames), appName, dProps);
            DeploymentStatus status = df.waitFor(progressObject);
            //we DO want it to continue and call the rest handlers, ie navigate(). This will
            //re-generate the table data because there may be some apps thats been undeployed
            //successfully.  If we stopProcessing, the table data is stale and still shows the
            //app that has been gone.
            if( checkDeployStatus(status, handlerCtx, false)){
View Full Code Here

Examples of com.sun.faban.common.CommandHandle.waitFor()

       
        if (dbHandle != null)
            dbHandle.waitFor();
       
        if (mediaHandle != null)
            mediaHandle.waitFor();

        //calculate total running time, including rampUp, steadyState,
        // and rampDown
        String rampUp = params.getParameter(
                               "fa:runConfig/fa:runControl/fa:rampUp");
View Full Code Here

Examples of com.xebialabs.overthere.OverthereProcess.waitFor()

            stderrReaderThread = getThread("stderr", commandLine.toString(), stderrHandler, process.getStderr(), latch);
            stderrReaderThread.start();

            try {
                latch.await();
                return process.waitFor();
            } catch (InterruptedException exc) {
                Thread.currentThread().interrupt();

                logger.info("Execution interrupted, destroying the process.");
                process.destroy();
View Full Code Here

Examples of com.xebialabs.overthere.OverthereProcess.waitFor()

    @Assumption(methods = "onUnix")
    public void shouldStartProcessSimpleCommandOnUnix() throws IOException, InterruptedException {
        OverthereProcess p = connection.startProcess(CmdLine.build("ls", "-ld", "/tmp/."));
        try {
            String commandOutput = CharStreams.toString(new InputStreamReader(p.getStdout()));
            assertThat(p.waitFor(), equalTo(0));
            assertThat(commandOutput, containsString("drwxrwxrwt"));
        } finally {
            p.destroy();
        }
    }
View Full Code Here

Examples of com.xebialabs.overthere.OverthereProcess.waitFor()

    @Assumption(methods = {"onWindows", "supportsProcess"})
    public void shouldStartProcessSimpleCommandOnWindows() throws IOException, InterruptedException {
        OverthereProcess p = connection.startProcess(CmdLine.build("ipconfig"));
        try {
            String commandOutput = CharStreams.toString(new InputStreamReader(p.getStdout()));
            assertThat(p.waitFor(), equalTo(0));
            assertThat(commandOutput, not(containsString("ipconfig")));
            assertThat(commandOutput, containsString("Windows IP Configuration"));
        } finally {
            p.waitFor();
        }
View Full Code Here

Examples of com.xebialabs.overthere.OverthereProcess.waitFor()

            String commandOutput = CharStreams.toString(new InputStreamReader(p.getStdout()));
            assertThat(p.waitFor(), equalTo(0));
            assertThat(commandOutput, not(containsString("ipconfig")));
            assertThat(commandOutput, containsString("Windows IP Configuration"));
        } finally {
            p.waitFor();
        }
    }

    @Test
    @Assumption(methods = {"onWindows", "supportsProcess", "notSftpCygwin", "notSftpWinsshd"})
View Full Code Here

Examples of com.xebialabs.overthere.OverthereProcess.waitFor()

            enterPrompt(stdin, reply);

            String hi = waitForPrompt(stdout, "Hi");
            assertThat(hi, containsString("Vincent"));
        } finally {
            process.waitFor();
        }
    }

    private String waitForPrompt(BufferedReader stdout, String prompt) throws IOException {
        for (; ; ) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.