[Dev-luatex] problem with os.spawn+os.execute on win32

Hans Hagen pragma at wxs.nl
Tue Sep 2 10:09:12 CEST 2008


Manuel Pégourié-Gonnard wrote:
> Hi Taco, hi Hans, hi everyone,
> 
> With LuaTeX 0.25.4 from the TeX Live distribution, I get a strange
> behaviour when, in a texlua script, I call another texlua script which
> in turn calls a program, depending on the sequence os.spawn and/or
> os.execute I use.
> 
> Example, assuming acrord32 is in the PATH and presentation.pdf exists:
> 
> % wrapper.tlu
> kpse.set_program_name("texlua")
> os.spawn('texlua d:/mpg/program.tlu') -- or...
> -- os.execute('texlua d:/mpg/program.tlu)
> 
> % program.tlu
> os.execute ('acrord32 "d:\\mpg\\presentation.pdf"') -- or...
> -- os.spawn ('acrord32 "d:\\mpg\\presentation.pdf"')
> 
> Now if I run 'texlua wrapper.tlu' from a command line, when Adobe Reader
> 9 starts, it immediatly crashes showing an error box "internal error".

can you try the table call, like in

os.exec({"c:\\Program Files\\Adobe\\Reader 
9.0\\Reader\\acrord32.exe","e:/tmp/oeps.pdf"})

here both spawn and exec seem to work ok

> I tend to believe that 3 and 4 a rather anecdotic, and though in theory
> the problem could come from kpse or AR, it may actually be more related
> to os.spawn. A quick look at loslibext.c let me think that os.spawn is
> indeed rather tricky on windows (and at least more than on *nix).

btw, there is 'pdfopen' for opening pdf files; if the operating system 
supports suffix associations os.execute("e:/tmp/oeps.pdf") works too


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the dev-luatex mailing list