process

open fun <T> process(binder: ResourceLoader.RuntimeBinder, block: (tor: File, configureEnv: MutableMap<String, String>.() -> Unit) -> T): T(source)

Lambda for building and/or spawning a process.

e.g. (Using the kmp-process library)

val builder = loaderExec.process(myBinder) { tor, configureEnv ->
    Process.Builder(command = tor.path)
        .args(myTorArgs)
        .environment(configureEnv)
        .stdin(Stdio.Null)
}

See also

Throws

IllegalStateException

if binder is inappropriate, or there was a failure to extract the tor executable from application resources.

if there was a failure to extract the tor executable from application resources.