trait Process[F[_], O, E] extends ProcessLike[F]
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.
- F
Effect type
- O
Output type
- E
Error output type
- Alphabetic
- By Inheritance
- Process
- ProcessLike
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
- abstract val arguments: List[String]
- abstract val command: String
- implicit abstract val concurrent: Concurrent[F]
- abstract val environmentVariables: Map[String, String]
- abstract val errorRedirection: OutputRedirection[F]
- abstract val inputRedirection: InputRedirection[F]
- abstract val outputRedirection: OutputRedirection[F]
- abstract val removedEnvironmentVariables: Set[String]
- abstract val runErrorStream: (java.io.InputStream, Blocker, ContextShift[F]) ⇒ F[E]
- abstract val runOutputStream: (java.io.InputStream, Blocker, ContextShift[F]) ⇒ F[O]
-
abstract
def
withArguments(newArguments: List[String]): Process[F, O, E]
Replaces the arguments
Replaces the arguments
Use the variant in the ProcessConfiguration trait to preserve the exact process type
- newArguments
new list of arguments
- returns
returns a new process specification
-
abstract
def
withCommand(newCommand: String): Process[F, O, E]
Replaces the command
Replaces the command
Use the variant in the ProcessConfiguration trait to preserve the exact process type
- newCommand
new value for the command to be executed
- returns
returns a new process specification
- abstract val workingDirectory: Option[Path]
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
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(blocker: Blocker)(implicit runner: ProcessRunner[F]): F[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
- blocker
Execution context for blocking operations
- runner
The process runner to be used
- returns
the result of the finished process
-
def
start(blocker: Blocker)(implicit runner: ProcessRunner[F]): Resource[F, Fiber[F, 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).
- blocker
Execution context for blocking operations
- runner
The process runner to be used
- returns
a managed fiber representing the running process
-
def
startProcess(blocker: Blocker)(implicit runner: ProcessRunner[F]): F[RunningProcess[F, O, E]]
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.
- blocker
Execution context for blocking operations
- 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( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()