[luatex] os.execute
Hans Hagen
pragma at wxs.nl
Sun Nov 29 11:05:34 CET 2015
On 11/28/2015 9:39 PM, Reinhard Kotucha wrote:
> On 2015-11-28 at 15:08:43 +0100, luigi scarso wrote:
>
> > On Sat, Nov 28, 2015 at 10:14 AM, Dirk Laurie <dirk.laurie at gmail.com> wrote:
> >
> > In Lua 5.2, the definition of os.execute changed to:
> >
> > This function is equivalent to the ISO C function system. It passes
> > command to be executed by an operating system shell. Its first result
> > is true if the command terminated successfully, or nil otherwise.
> > After this first result the function returns a string and a number, as
> > follows:
> >
> > "exit": the command terminated normally; the following number is the
> > exit status of the command.
> > "signal": the command was terminated by a signal; the following number
> > is the signal that terminated the command.
> >
> > When called without a command, os.execute returns a boolean that is
> > true if a shell is available.
> >
> > In Lua 5.1, it was:
> >
> > This function is equivalent to the C function system. It passes
> > command to be executed by an operating system shell. It returns a
> > status code, which is system-dependent. If command is absent, then it
> > returns nonzero if a shell is available and zero otherwise.
> >
> > In LuaTeX, Version beta-0.76.0-2013121407 (TeX Live 2013/dev/Debian),
> > _VERSION is "Lua 5.2" but os.execute still behaves as in Lua 5.1.
> >
> > Is this still true in Version 0.85.0? If so, is it a policy decision
> > that one can rely on?
> >
> > Thank you for the report.
> > We are seeing if we can jump to 5.3,
> > at some moment we will review also os.execute.
>
> Hi Luigi,
> as far as signals are concerned, I don't know whether they are
> properly supported by Windows. Honestly, I doubt. Thus I recommend
> to test them with stock Lua on various versions of Windows before
> adapting LuaTeX.
we might just as well keep the current implementation as it also needs
to hook in security options so we don't have to follow stock lua here;
one can always wrap os.execute into something that does what one wants
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
More information about the luatex
mailing list