[luatex] \pdfshellescape

luigi scarso luigi.scarso at gmail.com
Sat Dec 5 22:17:01 CET 2015


On Sat, Dec 5, 2015 at 6:51 PM, David Carlisle <d.p.carlisle at gmail.com>
wrote:

> The manual lists \pdfshellescape (which used to be 0 1 or 2 depending
> if shell escape was allowed or not) as having been dropped as it can
> be implemented in lua.
>
> Is there a recommended implementation of this?
>
> I'd hoped to just see a lua value in the status library or some place
> set to 0,1,2 as before (or even a \pdfvariable type thing) but it
> seems that the only options are to
>
> look at
> kpse.var_value("shell_escape") -- for texmf.cnf settings
> texconfig.shell_escape -- for lua initialization settings and
> arg array for the commandline
> and re-do the merging of these to determine whether os.execute is
> allowed or restricted?
>
> or to try running os.execute and testing the result?
>
>  but I was looking to avoid calling os.execute if it was prevented by
> the current settings.
>
>
> any hints welcome:-)
>
> David
>

try

\directlua{print('os.execute():|',os.execute(),'|')}
\bye

with  also
--shell-restricted
--no-shell-escape

It should be ok.



-- 
luigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/luatex/attachments/20151205/6b754ed6/attachment.html>


More information about the luatex mailing list