Home  |  Linux  | Mysql  | PHP  | XML
From:Bob Davis Date:Fri Aug 15 15:50:05 2008
Subject:Re: 2 process of par
bob davis wrote:
> I know I asked this question before. (but didnt get an answer)
> on win32 par makes an executable and when that executable is run I get 
> 2 processes. When I do the same on cygwin or linux I only get one 
> process.
>
> Anybody know why?
>
> thanks
> bob
So I think I found the file where the spawn is occuring.
myldr/static.c

#ifdef WIN32
    hinstLib = LoadLibrary("user32");
    if (hinstLib != NULL) {
        ProcAdd = (pALLOW) GetProcAddress(hinstLib, 
"AllowSetForegroundWindow");
        if (ProcAdd != NULL)
        {
            (ProcAdd)(ASFW_ANY);
        }
    }

    par_setenv("PAR_SPAWNED", "1");
    i = spawnvpe(P_WAIT, my_file, (const char* const*)argv, (const char* 
const*)environ);
#else
    execvp(my_file, argv);
    return 2;
#endif

 par_cleanup(stmpdir);

I tried making it always do the #ifndef WIN32 branch and it failed the 
make test. Not sure why. Something about arg execvp wrong.

The only thing I lose is the par_cleanup which I would be willing to 
lose.(if I understand what its doing) I think it is just cleaning up the 
temp files if the env var par_env_clean is set.



Any suggestions?

thanks
bob
Navigate in group perl.par at sever nntp.perl.org
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by PHP Developer
Powered By PHP Consultants