Cleaned up documentation

This commit is contained in:
Robinson 2021-01-26 22:19:25 +01:00
parent 6bd8ab87e1
commit 8ba7e8f83b
5 changed files with 7 additions and 9 deletions

View File

@ -455,7 +455,7 @@ class DeferredProcessResult internal constructor(private val process: Process,
* SOMETIMES, this PID is invalid because it can be recycled by linux! * SOMETIMES, this PID is invalid because it can be recycled by linux!
* see: http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6469606 * 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) val pid = PidHelper.get(process)

View File

@ -338,11 +338,10 @@ open class Executor {
} }
/** /**
* Splits string by spaces and passes it to [Executor.command]<br></br> * Splits string by spaces and passes it to [Executor.command]
* *
* NB: this method does not handle whitespace escaping, * Note: this method does not handle whitespace escaping,
* `"mkdir new\ folder"` would be interpreted as * `"mkdir new\ folder"` would be interpreted as `{"mkdir", "new\", "folder"}` command.
* `{"mkdir", "new\", "folder"}` command.
* *
* @param commandWithArgs A string array containing the program and its arguments. * @param commandWithArgs A string array containing the program and its arguments.
* *
@ -1068,7 +1067,6 @@ open class Executor {
DeferredProcessResult.checkExit(attributes, result) DeferredProcessResult.checkExit(attributes, result)
} }
/** /**
* If there is high-performance I/O necessary (lots of I/O with the subprocess), then multiple threads * 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. * can be used for pumping the I/O.

View File

@ -303,7 +303,7 @@ class JvmExecOptions(private val executor: Executor) {
* *
* Calling [SyncProcessResult.output] will result in a blocking read of process output. * 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. * Invoke [DeferredProcessResult.cancel] to destroy the process.
* *

View File

@ -33,7 +33,7 @@ class NopProcessResult(pid: Long, exitValue: Int) : SyncProcessResult(pid, exitV
/** /**
* @return output of the finished process. * @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. * @throws IllegalStateException if reading the output was not enabled.
*/ */

View File

@ -48,7 +48,7 @@ open class SyncProcessResult(
/** /**
* @return output of the finished process. * @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. * @throws IllegalStateException if reading the output was not enabled.
*/ */