diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/.os.luadoc | 8 | ||||
-rw-r--r-- | core/init.lua | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/core/.os.luadoc b/core/.os.luadoc index 69132e6f..1908c200 100644 --- a/core/.os.luadoc +++ b/core/.os.luadoc @@ -6,13 +6,13 @@ module('os') --- --- Spawns an interactive child process *argv* in a separate thread, returning +-- Spawns an interactive child process *cmd* in a separate thread, returning -- a handle to that process. --- On Windows, *argv* is passed to `cmd.exe`: `%COMSPEC% /c [argv]`. +-- On Windows, *cmd* is passed to `cmd.exe`: `%COMSPEC% /c [cmd]`. -- At the moment, only the Windows terminal version spawns processes in the same -- thread. --- @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 cmd 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. When omitted, the parent's cwd is used. -- @param env Optional list of environment variables for the child process. diff --git a/core/init.lua b/core/init.lua index 07c9e060..32e4090a 100644 --- a/core/init.lua +++ b/core/init.lua @@ -23,7 +23,7 @@ _M = {} -- language modules table -- pdcurses compatibility. if CURSES and WIN32 then - function os.spawn(argv, ...) + function os.spawn(cmd, ...) local cwd = lfs.currentdir() local args, i = {...}, 1 if type(args[i]) == 'string' then @@ -31,7 +31,7 @@ if CURSES and WIN32 then i = i + 1 end if type(args[i]) == 'table' then i = i + 1 end -- env (ignore) - local p = io.popen(assert_type(argv, 'string', 1) .. ' 2>&1') + local p = io.popen(assert_type(cmd, 'string', 1) .. ' 2>&1') if type(args[i]) == 'function' then args[i](p:read('a')) end -- stdout_cb local status = select(3, p:close()) if type(args[i + 2]) == 'function' then args[i + 2](status) end -- exit_cb |