From b128d8b4c48335b76076b0030ab41dbe9bdfb616 Mon Sep 17 00:00:00 2001 From: Takase <20792268+takase1121@users.noreply.github.com> Date: Mon, 4 Oct 2021 12:32:48 +0800 Subject: [PATCH] update process API docs - add more description to each option - add disclaimer that process.REDIRECT_DEFAULT should no longer be used --- docs/api/process.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/api/process.lua b/docs/api/process.lua index abba67ae..4d146bc4 100644 --- a/docs/api/process.lua +++ b/docs/api/process.lua @@ -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