From 8ba7e8f83bc7af4f606831a1955e51136aaa41d0 Mon Sep 17 00:00:00 2001 From: Robinson Date: Tue, 26 Jan 2021 22:19:25 +0100 Subject: [PATCH] Cleaned up documentation --- src/dorkbox/executor/DeferredProcessResult.kt | 2 +- src/dorkbox/executor/Executor.kt | 8 +++----- src/dorkbox/executor/JvmExecOptions.kt | 2 +- src/dorkbox/executor/processResults/NopProcessResult.kt | 2 +- src/dorkbox/executor/processResults/SyncProcessResult.kt | 2 +- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/dorkbox/executor/DeferredProcessResult.kt b/src/dorkbox/executor/DeferredProcessResult.kt index 52c78f0..264c5e8 100644 --- a/src/dorkbox/executor/DeferredProcessResult.kt +++ b/src/dorkbox/executor/DeferredProcessResult.kt @@ -455,7 +455,7 @@ class DeferredProcessResult internal constructor(private val process: Process, * SOMETIMES, this PID is invalid because it can be recycled by linux! * see: http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6469606 * - * @return 0 if there is no PID (failure to start the process) + * @return 0 if there is no PID (failure to start the process), or -1 if getting the pid is not possible */ val pid = PidHelper.get(process) diff --git a/src/dorkbox/executor/Executor.kt b/src/dorkbox/executor/Executor.kt index 7486388..9f49527 100644 --- a/src/dorkbox/executor/Executor.kt +++ b/src/dorkbox/executor/Executor.kt @@ -338,11 +338,10 @@ open class Executor { } /** - * Splits string by spaces and passes it to [Executor.command]

+ * Splits string by spaces and passes it to [Executor.command] * - * NB: this method does not handle whitespace escaping, - * `"mkdir new\ folder"` would be interpreted as - * `{"mkdir", "new\", "folder"}` command. + * Note: this method does not handle whitespace escaping, + * `"mkdir new\ folder"` would be interpreted as `{"mkdir", "new\", "folder"}` command. * * @param commandWithArgs A string array containing the program and its arguments. * @@ -1068,7 +1067,6 @@ open class Executor { DeferredProcessResult.checkExit(attributes, result) } - /** * If there is high-performance I/O necessary (lots of I/O with the subprocess), then multiple threads * can be used for pumping the I/O. diff --git a/src/dorkbox/executor/JvmExecOptions.kt b/src/dorkbox/executor/JvmExecOptions.kt index c2b8c10..5d79d9c 100644 --- a/src/dorkbox/executor/JvmExecOptions.kt +++ b/src/dorkbox/executor/JvmExecOptions.kt @@ -303,7 +303,7 @@ class JvmExecOptions(private val executor: Executor) { * * Calling [SyncProcessResult.output] will result in a blocking read of process output. * - * The value passed to [.timeout] is ignored. Use [DeferredProcessResult.get] to wait for the process to finish. + * The value passed to [.timeout] is ignored. Use [DeferredProcessResult.await] to wait for the process to finish. * * Invoke [DeferredProcessResult.cancel] to destroy the process. * diff --git a/src/dorkbox/executor/processResults/NopProcessResult.kt b/src/dorkbox/executor/processResults/NopProcessResult.kt index 7f21c98..2252f7e 100644 --- a/src/dorkbox/executor/processResults/NopProcessResult.kt +++ b/src/dorkbox/executor/processResults/NopProcessResult.kt @@ -33,7 +33,7 @@ class NopProcessResult(pid: Long, exitValue: Int) : SyncProcessResult(pid, exitV /** * @return output of the finished process. * - * You must invoke [ProcessExecutor.readOutput] to allow the process output to be read. + * You must invoke [dorkbox.executor.Executor.readOutput] to allow the process output to be read. * * @throws IllegalStateException if reading the output was not enabled. */ diff --git a/src/dorkbox/executor/processResults/SyncProcessResult.kt b/src/dorkbox/executor/processResults/SyncProcessResult.kt index 43ba683..48399d4 100644 --- a/src/dorkbox/executor/processResults/SyncProcessResult.kt +++ b/src/dorkbox/executor/processResults/SyncProcessResult.kt @@ -48,7 +48,7 @@ open class SyncProcessResult( /** * @return output of the finished process. * - * You must invoke [ProcessExecutor.readOutput] to allow the process output to be read. + * You must invoke [dorkbox.executor.Executor.readOutput] to allow the process output to be read. * * @throws IllegalStateException if reading the output was not enabled. */