Re: Subprocess execution with protection against parameter modification
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Subprocess execution with protection against parameter modification
- From: v <v19930312@...>
- Date: 2021年2月09日 08:32:00 +0300
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 <v19930312@gmail.com>