trait Process[O, E] extends ProcessLike with Prox.ProcessConfiguration
Describes a system process to be executed
This base trait is always extended with redirection and configuration capabilities represented by the traits ProcessConfiguration, RedirectableInput, RedirectableOutput and RedirectableError.
To create a process use the constructor in the companion object Process.apply.
The process specification not only encodes the process to be started but also how its input, output and error streams are redirected and executed. For this reason the effect type is also bound by the process, not just at execution time.
- O
Output type
- E
Error output type
- Alphabetic
- By Inheritance
- Process
- ProcessConfiguration
- ProcessLikeConfiguration
- ProcessLike
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- abstract type Self <: Prox.Process[O, E]
- Definition Classes
- Process → ProcessLikeConfiguration
Abstract Value Members
- abstract val arguments: List[String]
- abstract val command: String
- abstract val environmentVariables: Map[String, String]
- Definition Classes
- Process → ProcessLikeConfiguration
- abstract val errorRedirection: Prox.OutputRedirection
- abstract val inputRedirection: Prox.InputRedirection
- abstract val outputRedirection: Prox.OutputRedirection
- abstract val removedEnvironmentVariables: Set[String]
- Definition Classes
- Process → ProcessLikeConfiguration
- abstract val runErrorStream: (InputStream) => Prox.ProxIO[E]
- abstract val runOutputStream: (InputStream) => Prox.ProxIO[O]
- abstract def selfCopy(command: String, arguments: List[String], workingDirectory: Option[Path], environmentVariables: Map[String, String], removedEnvironmentVariables: Set[String]): Self
- Attributes
- protected
- Definition Classes
- ProcessConfiguration
- abstract val workingDirectory: Option[Path]
- Definition Classes
- Process → ProcessLikeConfiguration
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def applyConfiguration(workingDirectory: Option[Path], environmentVariables: Map[String, String], removedEnvironmentVariables: Set[String]): Self
- Attributes
- protected
- Definition Classes
- ProcessConfiguration → ProcessLikeConfiguration
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def in(workingDirectory: Path): Self
Changes the working directory of the process
Changes the working directory of the process
- workingDirectory
the working directory
- returns
a new process with the working directory set
- Definition Classes
- ProcessLikeConfiguration
- def inInheritedWorkingDirectory(): Self
Use the inherited working directory of the process instead of an explicit one
Use the inherited working directory of the process instead of an explicit one
- returns
a new process with the working directory cleared
- Definition Classes
- ProcessLikeConfiguration
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def run[Info]()(implicit runner: Prox.ProcessRunner[Info]): Prox.ProxIO[Prox.ProcessResult[O, E]]
Starts the process asynchronously and blocks the execution until it is finished
Starts the process asynchronously and blocks the execution until it is finished
- runner
The process runner to be used
- returns
the result of the finished process
- def start[Info]()(implicit runner: Prox.ProcessRunner[Info]): Prox.ProxResource[Prox.ProxFiber[Prox.ProcessResult[O, E]]]
Starts the process asynchronously and returns a closeable fiber representing it
Starts the process asynchronously and returns a closeable fiber representing it
Joining the fiber waits for the process to be terminated. Canceling the fiber terminates the process normally (with SIGTERM).
- runner
The process runner to be used
- returns
a managed fiber representing the running process
- def startProcess[Info]()(implicit runner: Prox.ProcessRunner[Info]): Prox.ProxIO[Prox.RunningProcess[O, E, Info]]
Starts the process asynchronously and returns the RunningProcess interface for it
Starts the process asynchronously and returns the RunningProcess interface for it
This is the most advanced way to start processes. See start and run as alternatives.
- Info
The runner-specific process info type
- runner
The process runner to be used
- returns
interface for handling the running process
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def with(nameValuePair: (String, String)): Self
Adds an environment variable to the process
Adds an environment variable to the process
- nameValuePair
A pair of name and value
- returns
a new process with the working directory set
- Definition Classes
- ProcessLikeConfiguration
- def withArguments(newArguments: List[String]): Self
Replaces the arguments
Replaces the arguments
- newArguments
new list of arguments
- returns
returns a new process specification
- Definition Classes
- ProcessConfiguration
- def withCommand(newCommand: String): Self
Replaces the command
Replaces the command
- newCommand
new value for the command to be executed
- returns
returns a new process specification
- Definition Classes
- ProcessConfiguration
- def without(name: String): Self
Removes an environment variable from the process
Removes an environment variable from the process
Usable to remove variables inherited from the parent process.
- name
Name of the environment variable
- returns
a new process with the working directory set
- Definition Classes
- ProcessLikeConfiguration