[Dev-luatex] again problems ..., os.spawn and spaces in names

Taco Hoekwater taco at elvenkind.com
Fri Feb 8 15:58:18 CET 2008



Norbert Preining wrote:
> Hi Taco,
> 
> On Fr, 08 Feb 2008, Taco Hoekwater wrote:
>> That's why I thought. You can try adding extra quote characters
>> around all arguments with spaces in them, has says that has a
>> tendency to help.
> 
> I added quotes around the args, now the debug statment gives
> me:
> 	DEBUG:	1	"c:/tl test/...."
> 	DEBUG:	2	"c:/tl test/...."
> and there is NO error, but also nothing happens. Normally the called
> perl scripts issues something, and needs some time for loading, but this
> here does nothing, it looks like nothing is spawned.

If that is indeed the problem, I can allow an explicit [0] entry in
the table to use to spawn the actual executable. This may even be
useful in some other scenarios.

> Strange enough it looks like this only happens on windows. I created a

I am not very surprised. Windows shell handling has always seemed to
me like a kludge on a klugde on a kludge on top of MSDOS 5.0.

> directory "a b", did put a sh there, and a script bla.sh doing a echo,
> and a bla.lua that does os.spawn on the full path, ie somehting like
> 	os.spawn("/home/norbert/a b/sh","/home/norbert/a b/bla.sh")
> (ok that two arguments are put into a table before sending it to spawn)

You can actually shortcut that

   os.spawn{"/home/norbert/a b/sh","/home/norbert/a b/bla.sh"}

is valid lua

Best wishes,
Taco


More information about the dev-luatex mailing list