update process API docs

- add more description to each option
- add disclaimer that process.REDIRECT_DEFAULT should no longer be used
This commit is contained in:
Takase 2021-10-04 12:32:48 +08:00 committed by GitHub
parent 6264caffe1
commit b128d8b4c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 5 deletions

View File

@ -57,23 +57,26 @@ process.WAIT_INFINITE = -1
---@type integer
process.WAIT_DEADLINE = -2
---Used for the process.options stdin, stdout and stderr fields.
---Default behavior for redirecting streams.
---This flag is deprecated and for backwards compatibility with reproc only.
---The behavior of this flag may change in future versions of Lite XL.
---@type integer
process.REDIRECT_DEFAULT = 0
---Used for the process.options stdin, stdout and stderr fields.
---Allow Process API to read this stream via process:read functions.
---@type integer
process.REDIRECT_PIPE = 1
---Used for the process.options stdin, stdout and stderr fields.
---Redirect this stream to the parent.
---@type integer
process.REDIRECT_PARENT = 2
---Used for the process.options stdin, stdout and stderr fields.
---Discard this stream (piping it to /dev/null)
---@type integer
process.REDIRECT_DISCARD = 3
---Used for the process.options stdin, stdout and stderr fields.
---Redirect this stream to stdout.
---This flag can only be used on process.options.stderr.
---@type integer
process.REDIRECT_STDOUT = 4