diff options
author | mitchell <70453897+667e-11@users.noreply.github.com> | 2018-10-15 10:26:45 -0400 |
---|---|---|
committer | mitchell <70453897+667e-11@users.noreply.github.com> | 2018-10-15 10:26:45 -0400 |
commit | c26866ad69a5f4deafc023b5c80bddf6d61f981d (patch) | |
tree | 29d7a44e83e02f8204b662f800cca761e4801c83 /core/.os.luadoc | |
parent | 5e86b286cf366e0db1a361d36dba4dac6d6dd843 (diff) |
Tweaked `os.spawn()` to allow omission of both cwd and env parameters.
Diffstat (limited to 'core/.os.luadoc')
-rw-r--r-- | core/.os.luadoc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/core/.os.luadoc b/core/.os.luadoc index 4dd473fa..5891060b 100644 --- a/core/.os.luadoc +++ b/core/.os.luadoc @@ -14,11 +14,10 @@ module('os') -- @param argv A command line string that contains the program's name followed -- by arguments to pass to it. `PATH` is searched for program names. -- @param cwd Optional current working directory (cwd) for the child --- process. The default value is `nil`, which inherits the parent's cwd. +-- process. When omitted, the parent's cwd is used. -- @param env Optional list of environment variables for the child process. --- Each element in the list is a 'KEY=VALUE' string. The default value is --- `nil`, which inherits the parent's environment. --- This parameter should be omitted completely instead of specifying `nil`. +-- Each element in the list is a 'KEY=VALUE' string. When omitted, the +-- parent's environment is used. -- @param stdout_cb Optional Lua function that accepts a string parameter for a -- block of standard output read from the child. Stdout is read asynchronously -- in 1KB or 0.5KB blocks (depending on the platform), or however much data is @@ -32,8 +31,8 @@ module('os') -- @param exit_cb Optional Lua function that is called when the child process -- finishes. The child's exit status is passed. -- @return proc or nil plus an error message on failure --- @usage os.spawn('lua buffer.filename', nil, print) --- @usage proc = os.spawn('lua -e "print(io.read())"', nil, print) +-- @usage os.spawn('lua buffer.filename', print) +-- @usage proc = os.spawn('lua -e "print(io.read())"', print) -- proc:write('foo\n') -- @class function -- @name os.spawn |