[luatex] Allow piped input

Reinhard Kotucha reinhard.kotucha at web.de
Sun Jun 16 02:14:44 CEST 2019


On 2019-06-14 at 12:47:36 +0200, luigi scarso wrote:

 > On Thu, Jun 13, 2019 at 5:53 AM Henri Menke <henrimenke at gmail.com> wrote:
 > 
 >     Dear devs,
 >    
 >     It would be great if LuaTeX accepted piped input.  Currently a
 >     command like
 >    
 >         texlua <(echo 'print "Hello"')
 >    
 >     fails with an error like "Script file /dev/fd/63 not found".  I
 >     have attached a simple patch which would eliminate the failure.
 >    
 >     Cheers, Henri
 > 
 > Does it work also in Windows ?
 > (I think so )

Pipes work on Windows (more or less).  If the shell (cmd.exe) is
involved, Windows is using heuristics in order to determine whether
the content of the file is "text" or "binary".  Text files are safe,
AFAIK.

Henri's example

  texlua <(echo 'print "Hello"')

definitely doesn't work on Windows because Microsoft doesn't support
command substitution.

Every Unix user expects that things like

  diff <(gunzip file1.gz) <(gunzip file2.gz)

work.  It's definitely a bug if luatex behaves differently.

I always vote for making TeX Live as platform independent as
possible.  But here we discuss interactive invocatation of texlua on
the command line, which is inherently system dependent.

As far as I understand, Henri's patch fixes a severe bug on Unix and
the question is not whether Windows users can use the particular
feature or not.  The question is whether Henri's patch breaks Windows.
It's unlikely but it should be thoroughly tested though.

In short:  I vote for applying the patch, regardless of whether
Windows users profit or not.  On Unix the current behavior is 
inacceptable.

Regards,
  Reinhard

-- 
------------------------------------------------------------------
Reinhard Kotucha                            Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                    mailto:reinhard.kotucha at web.de
------------------------------------------------------------------



More information about the luatex mailing list