Package org.jruby.util
Class ShellLauncher
java.lang.Object
org.jruby.util.ShellLauncher
This mess of a class is what happens when all Java gives you is
Runtime.getRuntime().exec(). Thanks dude, that really helped.
- Author:
- nicksieger
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ProcessbuildProcess(Ruby runtime, String[] args, String[] env, File pwd) static StringchangeDirInsideJar(Ruby runtime, String arg) static intexecAndWait(Ruby runtime, IRubyObject[] rawArgs) static intexecAndWait(Ruby runtime, IRubyObject[] rawArgs, Map mergeEnv) static FilefindPathExecutable(Ruby runtime, String fname) static FilefindPathExecutable(Ruby runtime, String fname, IRubyObject pathObject) Deprecated.static FilefindPathExecutable(ThreadContext context, String fname, IRubyObject pathObject) static String[]getCurrentEnv(Ruby runtime) static String[]getModifiedEnv(Ruby runtime, Collection mergeEnv, boolean clearEnv) Deprecated.static String[]getModifiedEnv(ThreadContext context, Collection mergeEnv, boolean clearEnv) static longgetPidFromProcess(Process process) static ShellLauncher.POpenProcesspopen(Ruby runtime, IRubyObject[] strings, Map env, IOOptions modes) Deprecated.static ShellLauncher.POpenProcesspopen(Ruby runtime, IRubyObject[] strings, Map env, ModeFlags modes) static ShellLauncher.POpenProcesspopen(Ruby runtime, IRubyObject string, Map env, ModeFlags modes) static ShellLauncher.POpenProcesspopen(Ruby runtime, IRubyObject string, IOOptions modes) Deprecated.static ShellLauncher.POpenProcesspopen(Ruby runtime, IRubyObject string, ModeFlags modes) static ShellLauncher.POpenProcesspopen3(Ruby runtime, IRubyObject[] strings) Deprecated.static ShellLauncher.POpenProcesspopen3(Ruby runtime, IRubyObject[] strings, boolean addShell) Deprecated.static longreflectPidFromProcess(Process process) static Processrun(Ruby runtime, Map env, String dir, IRubyObject[] rawArgs, boolean doExecutableSearch, boolean forceExternalProcess) static Processrun(Ruby runtime, IRubyObject string) static Processrun(Ruby runtime, IRubyObject[] rawArgs, boolean doExecutableSearch) static Processrun(Ruby runtime, IRubyObject[] rawArgs, boolean doExecutableSearch, boolean forceExternalProcess) static intrunAndWait(Ruby runtime, IRubyObject[] rawArgs) static intrunAndWait(Ruby runtime, IRubyObject[] rawArgs, OutputStream output) static intrunAndWait(Ruby runtime, IRubyObject[] rawArgs, OutputStream output, boolean doExecutableSearch) static long[]runAndWaitPid(Ruby runtime, IRubyObject[] rawArgs) static long[]runAndWaitPid(Ruby runtime, IRubyObject[] rawArgs, OutputStream output, boolean doExecutableSearch) static longrunExternal(Ruby runtime, IRubyObject env, IRubyObject prog, IRubyObject options, IRubyObject args, boolean wait) static intrunExternalAndWait(Ruby runtime, IRubyObject[] rawArgs, Map mergeEnv) static longrunExternalWithoutWait(Ruby runtime, IRubyObject[] rawArgs) static longrunExternalWithoutWait(Ruby runtime, IRubyObject env, IRubyObject prog, IRubyObject options, IRubyObject args) static longrunWithoutWait(Ruby runtime, IRubyObject[] rawArgs) static booleanshouldUseShell(String command) static InputStreamunwrapBufferedStream(InputStream filteredStream) Deprecated.static OutputStreamunwrapBufferedStream(OutputStream filteredStream) Deprecated.static InputStreamunwrapFilterInputStream(InputStream filteredStream) Deprecated.static OutputStreamunwrapFilterOutputStream(OutputStream filteredStream) Deprecated.
-
Constructor Details
-
ShellLauncher
public ShellLauncher()
-
-
Method Details
-
getCurrentEnv
-
getModifiedEnv
@Deprecated public static String[] getModifiedEnv(Ruby runtime, Collection mergeEnv, boolean clearEnv) Deprecated. -
getModifiedEnv
-
findPathExecutable
-
findPathExecutable
@Deprecated(since="10.0") public static File findPathExecutable(Ruby runtime, String fname, IRubyObject pathObject) Deprecated. -
findPathExecutable
-
runAndWait
-
runAndWaitPid
-
runWithoutWait
-
runExternalAndWait
-
runExternalWithoutWait
public static long runExternalWithoutWait(Ruby runtime, IRubyObject env, IRubyObject prog, IRubyObject options, IRubyObject args) -
runExternal
public static long runExternal(Ruby runtime, IRubyObject env, IRubyObject prog, IRubyObject options, IRubyObject args, boolean wait) -
changeDirInsideJar
-
buildProcess
public static Process buildProcess(Ruby runtime, String[] args, String[] env, File pwd) throws IOException - Throws:
IOException
-
runExternalWithoutWait
-
execAndWait
-
execAndWait
-
runAndWait
-
runAndWait
public static int runAndWait(Ruby runtime, IRubyObject[] rawArgs, OutputStream output, boolean doExecutableSearch) -
runAndWaitPid
public static long[] runAndWaitPid(Ruby runtime, IRubyObject[] rawArgs, OutputStream output, boolean doExecutableSearch) -
getPidFromProcess
-
reflectPidFromProcess
-
run
- Throws:
IOException
-
popen
public static ShellLauncher.POpenProcess popen(Ruby runtime, IRubyObject string, ModeFlags modes) throws IOException - Throws:
IOException
-
popen
public static ShellLauncher.POpenProcess popen(Ruby runtime, IRubyObject[] strings, Map env, ModeFlags modes) throws IOException - Throws:
IOException
-
popen
public static ShellLauncher.POpenProcess popen(Ruby runtime, IRubyObject string, Map env, ModeFlags modes) throws IOException - Throws:
IOException
-
popen
@Deprecated public static ShellLauncher.POpenProcess popen(Ruby runtime, IRubyObject string, IOOptions modes) throws IOException Deprecated.- Throws:
IOException
-
popen
@Deprecated public static ShellLauncher.POpenProcess popen(Ruby runtime, IRubyObject[] strings, Map env, IOOptions modes) throws IOException Deprecated.- Throws:
IOException
-
popen3
@Deprecated public static ShellLauncher.POpenProcess popen3(Ruby runtime, IRubyObject[] strings) throws IOException Deprecated.- Throws:
IOException
-
popen3
@Deprecated public static ShellLauncher.POpenProcess popen3(Ruby runtime, IRubyObject[] strings, boolean addShell) throws IOException Deprecated.- Throws:
IOException
-
run
public static Process run(Ruby runtime, IRubyObject[] rawArgs, boolean doExecutableSearch) throws IOException - Throws:
IOException
-
run
public static Process run(Ruby runtime, IRubyObject[] rawArgs, boolean doExecutableSearch, boolean forceExternalProcess) throws IOException - Throws:
IOException
-
run
public static Process run(Ruby runtime, Map env, String dir, IRubyObject[] rawArgs, boolean doExecutableSearch, boolean forceExternalProcess) throws IOException - Throws:
IOException
-
shouldUseShell
-
unwrapBufferedStream
Deprecated. -
unwrapBufferedStream
Deprecated. -
unwrapFilterOutputStream
Deprecated. -
unwrapFilterInputStream
Deprecated.
-