lua-users home
lua-l archive

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

On Tue, 2022-09-20 at 10:44 +0200, Marvin Scholz wrote:
> On 20 Sep 2022, at 9:47, Tomas Mudrunka wrote:
> [ ... system(3) vs execv(3) style of command invocation ...
> Unfortunately on Windows that is not so trivial to do:

Haven't read the full article, just the conclusion. That funny
recommendation that the caller should do something based on the
type of callee. The point (at least in UNIX) is that those who
emit a command don't know, and should not care, whether what they
call is a binary executable, or a shell script, or some other
hash-bang thingamabob. It's just another program which receives a
set of command line words.

(And yes, when execv(3) is available I'd always prefer it over
the system(3) invocation, not for the cost savings of the
intermediate shell, but for the reliable communication of what
the words are.)

virtually yours
Gerhard Sittig
     If you don't understand or are scared by any of the above
             ask your parents or an adult to help you.