/** * Creates a magic cookie that can be used as the model environment variable * when we later kill the processes. * * @deprecated Use {@link EnvVars#createCookie()} */ @Deprecated public static EnvVars createCookie() { return EnvVars.createCookie(); }
final EnvVars cookie = EnvVars.createCookie(); pb.environment().putAll(cookie);
this.name = name; this.out = out; this.cookie = EnvVars.createCookie(); procBuilder.environment().putAll(cookie); if (procBuilder.directory() != null && !procBuilder.directory().exists()) {
/** * Creates a magic cookie that can be used as the model environment variable * when we later kill the processes. * * @deprecated Use {@link EnvVars#createCookie()} */ public static EnvVars createCookie() { return EnvVars.createCookie(); }
/** * Creates a magic cookie that can be used as the model environment variable * when we later kill the processes. * * @deprecated Use {@link EnvVars#createCookie()} */ public static EnvVars createCookie() { return EnvVars.createCookie(); }
/** * Creates a magic cookie that can be used as the model environment variable * when we later kill the processes. * * @deprecated Use {@link EnvVars#createCookie()} */ public static EnvVars createCookie() { return EnvVars.createCookie(); }
/** * Creates a magic cookie that can be used as the model environment variable * when we later kill the processes. * * @deprecated Use {@link EnvVars#createCookie()} */ public static EnvVars createCookie() { return EnvVars.createCookie(); }
/** * Creates a magic cookie that can be used as the model environment variable * when we later kill the processes. * * @deprecated Use {@link EnvVars#createCookie()} */ @Deprecated public static EnvVars createCookie() { return EnvVars.createCookie(); }
final EnvVars cookie = EnvVars.createCookie(); pb.environment().putAll(cookie);
private LocalProc( String name, ProcessBuilder procBuilder, InputStream in, OutputStream out, OutputStream err ) throws IOException { Logger.getLogger(Proc.class.getName()).log(Level.FINE, "Running: {0}", name); this.name = name; this.out = out; this.cookie = EnvVars.createCookie(); procBuilder.environment().putAll(cookie); this.proc = procBuilder.start(); copier = new StreamCopyThread(name+": stdout copier", proc.getInputStream(), out); copier.start(); if(in!=null) new StdinCopyThread(name+": stdin copier",in,proc.getOutputStream()).start(); else proc.getOutputStream().close(); if(err!=null) { copier2 = new StreamCopyThread(name+": stderr copier", proc.getErrorStream(), err); copier2.start(); } else { // while this is not discussed in javadoc, even with ProcessBuilder.redirectErrorStream(true), // Process.getErrorStream() still returns a distinct reader end of a pipe that needs to be closed. // this is according to the source code of JVM proc.getErrorStream().close(); copier2 = null; } }
final EnvVars cookie = EnvVars.createCookie(); pb.environment().putAll(cookie);
final EnvVars cookie = EnvVars.createCookie(); pb.environment().putAll(cookie);
private LocalProc( String name, ProcessBuilder procBuilder, InputStream in, OutputStream out, OutputStream err ) throws IOException { Logger.getLogger(Proc.class.getName()).log(Level.FINE, "Running: {0}", name); this.name = name; this.out = out; this.cookie = EnvVars.createCookie(); procBuilder.environment().putAll(cookie); this.proc = procBuilder.start(); copier = new StreamCopyThread(name+": stdout copier", proc.getInputStream(), out); copier.start(); if(in!=null) new StdinCopyThread(name+": stdin copier",in,proc.getOutputStream()).start(); else proc.getOutputStream().close(); if(err!=null) { copier2 = new StreamCopyThread(name+": stderr copier", proc.getErrorStream(), err); copier2.start(); } else { // while this is not discussed in javadoc, even with ProcessBuilder.redirectErrorStream(true), // Process.getErrorStream() still returns a distinct reader end of a pipe that needs to be closed. // this is according to the source code of JVM proc.getErrorStream().close(); copier2 = null; } }
private LocalProc( String name, ProcessBuilder procBuilder, InputStream in, OutputStream out, OutputStream err ) throws IOException { Logger.getLogger(Proc.class.getName()).log(Level.FINE, "Running: {0}", name); this.name = name; this.out = out; this.cookie = EnvVars.createCookie(); procBuilder.environment().putAll(cookie); this.proc = procBuilder.start(); copier = new StreamCopyThread(name+": stdout copier", proc.getInputStream(), out); copier.start(); if(in!=null) new StdinCopyThread(name+": stdin copier",in,proc.getOutputStream()).start(); else proc.getOutputStream().close(); if(err!=null) { copier2 = new StreamCopyThread(name+": stderr copier", proc.getErrorStream(), err); copier2.start(); } else { // while this is not discussed in javadoc, even with ProcessBuilder.redirectErrorStream(true), // Process.getErrorStream() still returns a distinct reader end of a pipe that needs to be closed. // this is according to the source code of JVM proc.getErrorStream().close(); copier2 = null; } }
private LocalProc(String name, ProcessBuilder procBuilder, InputStream in, OutputStream out, OutputStream err) throws IOException { Logger.getLogger(Proc.class.getName()).log(Level.FINE, "Running: {0}", name); this.name = name; this.out = out; this.cookie = EnvVars.createCookie(); procBuilder.environment().putAll(cookie); this.proc = procBuilder.start(); copier = new StreamCopyThread(name + ": stdout copier", proc.getInputStream(), out); copier.start(); if (in != null) { new StdinCopyThread(name + ": stdin copier", in, proc.getOutputStream()).start(); } else { proc.getOutputStream().close(); } if (err != null) { copier2 = new StreamCopyThread(name + ": stderr copier", proc.getErrorStream(), err); copier2.start(); } else { // while this is not discussed in javadoc, even with ProcessBuilder.redirectErrorStream(true), // Process.getErrorStream() still returns a distinct reader end of a pipe that needs to be closed. // this is according to the source code of JVM proc.getErrorStream().close(); copier2 = null; } }
final EnvVars cookie = EnvVars.createCookie(); pb.environment().putAll(cookie);
final EnvVars cookie = EnvVars.createCookie(); pb.environment().putAll(cookie);
this.name = name; this.out = out; this.cookie = EnvVars.createCookie(); procBuilder.environment().putAll(cookie); if (procBuilder.directory() != null && !procBuilder.directory().exists()) {
final EnvVars cookie = EnvVars.createCookie(); pb.environment().putAll(cookie); if (env != null) {
final EnvVars cookie = _cookie = EnvVars.createCookie(); pb.environment().putAll(cookie); pb.environment().put("WORKSPACE", StringUtils.defaultString(computer.getAbsoluteRemoteFs(), node.getRemoteFS())); //path for local slave log