Gr0a wrote:

> I have a strange problem with PAR 
> ...
> When i run test.par and i click on the button, the
> main window is "cloned" and for.par isn't executed. 

What's happening is that the "inner" invocation of PAR via
  open CMD, "perl -MPAR for.par |"
gets confused by some environment variable that has been
set by the "outer" invocation. In fact, it gets tricked 
into calling the outer PAR again (this explains the
"cloned" may window you're seeing).

The guilty environment variable is PAR_PROGNAME (="test.par").
If you unset it for the sub process, e.g.
  open CMD, "env -u PAR_PROGNAME perl -MPAR for.par |"
the program works as expected.

I think these environment variables are only needed when
pp creates an executable (because when you run the exe,
it first unpacks some stuff under /tmp/par-USER/sha1-of-exe,
then exec's this stuff - you need the environment to
pass information between these to invocations)...

BTW, while strace'ing the problem, I was appalled by the
number of execve's of /bin/pwd I saw - 715 times just to get
 
  perl -MPAR test.par

started (0 invocations for plain "perl test.pl). 


Cheers, Roderich

Reply via email to