On Fri, Aug 15, 2008 at 6:15 AM, bob davis <[EMAIL PROTECTED]> 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?
A pp-packed executable works like this (some details ommitted): (1) it creates the cache directory (e.g. /tmp/par-USER/LONGWINDED_CHECKSUM) and writes an executable there from an array contained in its data (that executable is actually named like the pp-packed executable, but it's different; in fact, it is a custom-built perl interpreter) (2) it "runs" the executable extracted in (1) (3) this process extracts more stuff from the original executable's file; these are perl modules (including shared libraries) that are necessary to access stuff in the PAR archive that is also contained in the original executable (4) finally your original script is read from the PAR and run (any other modules needed are loaded on demand from the PAR) The difference between *nix and Windows is in (2): on *nix the process from (1) does an exec of the new executable, on Windows it does a spawn. So in a sense there are two processes (over time) in both environments, but on *nix the second process overlays the first, while on Windows you can see them both. That still doesn't explain Cygwin, though :) Cheers, Roderich
