One reason the parent process can't exit is that it is also responsible
for doing the cleanup if the 'clean' switch is specified.  On Windows,
you cannot delete a file that is in use, which means it is impossible to
delete the .dll and .exe files in the child process.  However, the
parent can wait for the child to exit and then do the cleanup without
complaint.  Yet another wart caused by some poor Win32 design decisions.

I think another reason may be that if the parent terminates, the shell
thinks the command has completed and returns the prompt immediately.
The concept of a process group or a tree of processes is not as well
supported on Windows as it is on Unix.

--Scott

-----Original Message-----
From: Eric Wilhelm [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 14, 2008 10:45 PM
To: par@perl.org
Subject: Re: 2 processes on win32

# from bob davis
# on Thursday 14 August 2008 21:15:

>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.

The first is the decompression and bootstrap code (the executable header

on the zip file), the second is the program itself.  Once the second is 
started, the first is completely idle.

As for *why* there are two, I'll have to guess that it has something to 
do with exec() on win32 or one of those funny limitations which *nix 
systems don't have.  Perhaps someone else has a more precise answer.

--Eric
-- 
The opinions expressed in this e-mail were randomly generated by
the computer and do not necessarily reflect the views of its owner.
--Management
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------

Reply via email to