Package hudson

Examples of hudson.Proc.join()


            } catch (SocketTimeoutException e) {
                // failed to connect. Is the process dead?
                // if so, the error should have been provided by the launcher already.
                // so abort gracefully without a stack trace.
                if(!proc.isAlive())
                    throw new AbortException("Failed to launch Maven. Exit code = "+proc.join());
                throw e;
            }

            return new NewProcess(
                Channels.forProcess("Channel to Maven "+ Arrays.toString(cmds),
View Full Code Here


     */
    public void run(final String[] cmd) {
        run(new Runner() {
            public Result run(BuildListener listener) throws Exception {
                Proc proc = new Proc.LocalProc(cmd,getEnvironment(listener),System.in,new DualOutputStream(System.out,listener.getLogger()));
                return proc.join()==0?Result.SUCCESS:Result.FAILURE;
            }

            public void post(BuildListener listener) {
                // do nothing
            }
View Full Code Here

                ps.pwd(workDir);
            }
            Proc p;
            try {
                p = ps.start();
                Integer ret = p.join();
                //return ret;
            } catch (InterruptedException e) {
                if (output != null && closePipes) {
                    IOUtils.closeQuietly(output);
                }
View Full Code Here

            if(workDir!=null)   ps.pwd(workDir);

            Proc p;
            try {
                p = ps.start();
                Integer ret = p.join();
                if(out!=null) out.close();
                if(err!=null) err.close();
                return ret;
            } catch (InterruptedException e) {
                if(out!=null) out.close();
View Full Code Here

     */
    public void run(final String[] cmd) {
        run(new Runner() {
            public Result run(BuildListener listener) throws Exception {
                Proc proc = new Proc.LocalProc(cmd,getEnvironment(listener),System.in,new DualOutputStream(System.out,listener.getLogger()));
                return proc.join()==0?Result.SUCCESS:Result.FAILURE;
            }

            public void post(BuildListener listener) {
                // do nothing
            }
View Full Code Here

      FilePath debugLog = this.getDebugLog(moduleRoot);
      if (debugLog != null) {
        Runnable watchdog = new WatdogTask(debugLog, proc, listener.getLogger());
        future = EXECUTOR.scheduleAtFixedRate(watchdog, 500L, 500L, TimeUnit.MILLISECONDS);
      }
      int r = proc.join();
      this.appendDebugLog(moduleRoot, listener);
      return r == 0;
    } catch (IOException e) {
      this.appendDebugLog(moduleRoot, listener);
      Util.displayIOException(e, listener);
View Full Code Here

        future = EXECUTOR.scheduleAtFixedRate(watchdog, 500L, 500L, TimeUnit.MILLISECONDS);
      } else {
        // FIXME
        listener.getLogger().println("debug log doesn't exist");
      }
      int r = proc.join();
      // FIXME
      listener.getLogger().println("returned: " + r);
      return r == 0;
    } catch (IOException e) {
      // FIXME
View Full Code Here

      FilePath debugLog = this.getDebugLog(moduleRoot);
      if (debugLog != null) {
        Runnable watchdog = new WatdogTask(debugLog, proc, listener.getLogger());
        future = EXECUTOR.scheduleAtFixedRate(watchdog, 500L, 500L, TimeUnit.MILLISECONDS);
      }
      int r = proc.join();
      this.appendDebugLog(moduleRoot, listener);
      return r == 0;
    } catch (IOException e) {
      this.appendDebugLog(moduleRoot, listener);
      Util.displayIOException(e, listener);
View Full Code Here

      FilePath debugLog = this.getDebugLog(moduleRoot);
      if (debugLog != null) {
        Runnable watchdog = new WatdogTask(debugLog, proc, listener.getLogger());
        future = EXECUTOR.scheduleAtFixedRate(watchdog, 500L, 500L, TimeUnit.MILLISECONDS);
      }
      int r = proc.join();
      this.appendDebugLog(moduleRoot, listener);
      return r == 0;
    } catch (IOException e) {
      this.appendDebugLog(moduleRoot, listener);
      Util.displayIOException(e, listener);
View Full Code Here

      FilePath debugLog = this.getDebugLog(moduleRoot);
      if (debugLog != null) {
        Runnable watchdog = new WatdogTask(debugLog, proc, listener.getLogger());
        future = EXECUTOR.scheduleAtFixedRate(watchdog, 500L, 500L, TimeUnit.MILLISECONDS);
      }
      int r = proc.join();
      this.appendDebugLog(moduleRoot, listener);
      return r == 0;
    } catch (IOException e) {
      this.appendDebugLog(moduleRoot, listener);
      Util.displayIOException(e, listener);
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.