Re: [Dev-luatex] os.spawn and argv[1] with sapces

2009-11-29 Thread Taco Hoekwater
T T wrote: Indeed. The patch is attached. It did work for me as intended, but please review. Applied and looks ok, but I cannot actually test this. I also made adjustments to build.sh for mingw, see below: Added the MINGW part of that patch also. Best wishes, Taco

Re: [Dev-luatex] os.spawn and argv[1] with sapces

2009-11-27 Thread T T
2009/11/27 Taco Hoekwater : > > > T T wrote: >> 2009/11/27 Taco Hoekwater : >>> T T wrote: The above changes do not change the behaviour of currently working cases, only the failing ones and those resulting in wrongly parsed arguments being passed to the child process are affected. >

Re: [Dev-luatex] os.spawn and argv[1] with sapces

2009-11-27 Thread Paweł Jackowski
T T wrote: 2009/11/27 Taco Hoekwater : T T wrote: The above changes do not change the behaviour of currently working cases, only the failing ones and those resulting in wrongly parsed arguments being passed to the child process are affected. If that proposal sounds OK to you, I will write a pa

Re: [Dev-luatex] os.spawn and argv[1] with sapces

2009-11-27 Thread Taco Hoekwater
T T wrote: > 2009/11/27 Taco Hoekwater : >> T T wrote: >>> The above changes do not change the behaviour of currently working >>> cases, only the failing ones and those resulting in wrongly parsed >>> arguments being passed to the child process are affected. >>> >>> If that proposal sounds OK to

Re: [Dev-luatex] os.spawn and argv[1] with sapces

2009-11-27 Thread T T
2009/11/27 Taco Hoekwater : > T T wrote: >> >> The above changes do not change the behaviour of currently working >> cases, only the failing ones and those resulting in wrongly parsed >> arguments being passed to the child process are affected. >> >> If that proposal sounds OK to you, I will write

Re: [Dev-luatex] os.spawn and argv[1] with sapces

2009-11-26 Thread Taco Hoekwater
T T wrote: The above changes do not change the behaviour of currently working cases, only the failing ones and those resulting in wrongly parsed arguments being passed to the child process are affected. If that proposal sounds OK to you, I will write a patch implementing it. Yes, please do! B

Re: [Dev-luatex] os.spawn and argv[1] with sapces

2009-11-26 Thread T T
2009/11/24 Hans Hagen : > Reinhard Kotucha wrote: >> >> On 23 November 2009 Taco Hoekwater wrote: >> >>  > Let's put it this way: windows command line processing does not >>  > agree with my neurons, so I have stayed way from it as much as >>  > possible (and will continue to do so). >>  >  > A goo

Re: [Dev-luatex] os.spawn and argv[1] with sapces

2009-11-24 Thread Hans Hagen
Reinhard Kotucha wrote: On 23 November 2009 Taco Hoekwater wrote: > Let's put it this way: windows command line processing does not > agree with my neurons, so I have stayed way from it as much as > possible (and will continue to do so). > > A good, clean patch would be welcome of course,

Re: [Dev-luatex] os.spawn and argv[1] with sapces

2009-11-23 Thread Reinhard Kotucha
On 23 November 2009 Taco Hoekwater wrote: > Let's put it this way: windows command line processing does not > agree with my neurons, so I have stayed way from it as much as > possible (and will continue to do so). > > A good, clean patch would be welcome of course, [...] Hi Taco, if you cha

Re: [Dev-luatex] os.spawn and argv[1] with sapces

2009-11-23 Thread Jonathan Fine
Taco Hoekwater wrote: Hi Tomek, T T wrote: Hi, I have encountered a problem with os.spawn(arg) on Windows. If arg[1]='foo bar' and arg[0]=nil, then the spawned process gets 'foo' as argv[0] and 'bar' as argv[1]. This might be expected, since according to docs, os.spawn doesn't do any argument

Re: [Dev-luatex] os.spawn and argv[1] with sapces

2009-11-23 Thread Hans Hagen
T T wrote: 2009/11/23 T T : OK, I'm looking into that. After some digging through the sources and googling around I think the problem is not with luatex's implementation but with _spawnvpe function on Windows, which can't handle arguments with spaces (how pathetic). So I should write to M$ now

Re: [Dev-luatex] os.spawn and argv[1] with sapces

2009-11-23 Thread T T
2009/11/23 T T : > > OK, I'm looking into that. After some digging through the sources and googling around I think the problem is not with luatex's implementation but with _spawnvpe function on Windows, which can't handle arguments with spaces (how pathetic). So I should write to M$ now, I guess.

Re: [Dev-luatex] os.spawn and argv[1] with sapces

2009-11-23 Thread T T
2009/11/23 Taco Hoekwater : > > Let's put it this way: windows command line processing does not > agree with my neurons, so I have stayed way from it as much as > possible (and will continue to do so). Yes, I know it's PITA. > > A good, clean patch would be welcome of course, but I myself will no

Re: [Dev-luatex] os.spawn and argv[1] with sapces

2009-11-23 Thread Hans Hagen
T T wrote: 2009/11/23 Hans Hagen : arg = { "dir", "bar", '"foo bar"', } os.spawn(arg) works ok, so without arg[0] Yes, but your arg[1] has no spaces in it. Try running some program under %ProgramFiles% or other path with spaces. hm, hard to find one, but "c:/Program Files/WinRAR

Re: [Dev-luatex] os.spawn and argv[1] with sapces

2009-11-23 Thread T T
2009/11/23 Hans Hagen : > arg = { >    "dir", >    "bar", >    '"foo bar"', > } > > os.spawn(arg) > > works ok, so without arg[0] Yes, but your arg[1] has no spaces in it. Try running some program under %ProgramFiles% or other path with spaces. Cheers, Tomek _

Re: [Dev-luatex] os.spawn and argv[1] with sapces

2009-11-23 Thread Hans Hagen
T T wrote: Hi, I have encountered a problem with os.spawn(arg) on Windows. If arg[1]='foo bar' and arg[0]=nil, then the spawned process gets 'foo' as argv[0] and 'bar' as argv[1]. This might be expected, since according to docs, os.spawn doesn't do any argument processing. So I tried double quo

Re: [Dev-luatex] os.spawn and argv[1] with sapces

2009-11-23 Thread Taco Hoekwater
Hi Tomek, T T wrote: Hi, I have encountered a problem with os.spawn(arg) on Windows. If arg[1]='foo bar' and arg[0]=nil, then the spawned process gets 'foo' as argv[0] and 'bar' as argv[1]. This might be expected, since according to docs, os.spawn doesn't do any argument processing. Let's pu

[Dev-luatex] os.spawn and argv[1] with sapces

2009-11-23 Thread T T
Hi, I have encountered a problem with os.spawn(arg) on Windows. If arg[1]='foo bar' and arg[0]=nil, then the spawned process gets 'foo' as argv[0] and 'bar' as argv[1]. This might be expected, since according to docs, os.spawn doesn't do any argument processing. So I tried double quoting arg[1]='