Class RunProcess

  • All Implemented Interfaces:
    Named

    public class RunProcess
    extends ProcedureN
    The Kawa run-process command builds and runs a Process.
    • Field Detail

      • applyToConsumerRP

        public static final java.lang.invoke.MethodHandle applyToConsumerRP
      • instance

        public static final RunProcess instance
      • inheritSymbol

        public static final SimpleSymbol inheritSymbol
      • currentSymbol

        public static final SimpleSymbol currentSymbol
    • Constructor Detail

      • RunProcess

        public RunProcess​(java.lang.String name)
    • Method Detail

      • applyToConsumerRP

        public static java.lang.Object applyToConsumerRP​(Procedure proc,
                                                         CallContext ctx)
                                                  throws java.lang.Throwable
        Throws:
        java.lang.Throwable
      • error

        protected static void error​(java.lang.String message)
      • doit

        public static void doit​(ArgListVector args,
                                Consumer consumer)
                         throws java.lang.Throwable
        Throws:
        java.lang.Throwable
      • tokenize

        public static void tokenize​(java.lang.String str,
                                    boolean useShell,
                                    java.util.List<java.lang.String> arr)
        Parse strings into token, handling substitution marks.
        Parameters:
        useShell - true if result will be further tokenized by a shell. (In this case we're basically just handling substiution marks.)
      • getInputStreamFrom

        public static java.io.InputStream getInputStreamFrom​(java.lang.Object val)
      • copyStream

        public static void copyStream​(java.io.InputStream in,
                                      java.io.OutputStream out,
                                      boolean closeOut)
                               throws java.io.IOException
        Copy bytes from InputStream to OutputStream using current Thread. Continue copying until EOF or exception. At end, the input stream is closed, but the output stream is not.
        Throws:
        java.io.IOException