lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Tue, 2021-02-09 at 10:36 +1030, sur-behoffski wrote:
> G'day,
> [This message should be threaded, but I read the list in
> Digest mode, so apologies for any thread breakage.]
> A query came up in the last couple of days regarding
> executing commands but protecting parameters against
> unwanted modification by special character substitution
> by the shell.
> I'm on GNU/Linux; not sure if the following suggestion
> works on Windows(R).
> I use the Lua Rock "luaposix", which contains a slew of
> functions to work with the Posix interface of an OS.

Luaposix is indeed a good option for working with subprocesses, but it
is not available on Window. For windows, "winapi" module exists, which
is essentially a windows counterpart of luaposix.

If you want to use library both on POSIX and Windows systems, I'd
recommend looking at lua-subprocess module. Alternatively, you can
always write your own wrapper around luaposix and winapi that
encapsulates those into platform-independent API.
v <>