Thanks for responding. Late last night I solved the problem. Just for everyone's information and possible future use I will describe the solution. First off I tried calling system with the first parameter of '1', which was supposed to work, by asynchronously creating the new process and returning...but it didn't work either. Also system() is supposed to return the child PID, but it doesn't with the version of PERL that my system is running...it returns a process handle ID. Here is my PERL version.
This is perl, v5.8.7 built for MSWin32-x86-multi-thread Copyright 1987-2005, Larry Wall
Here is what I tried, and it didn't work. The parent process didn't return 0, until the child process exited.
$ChildPID = system 1, $CMDLine; my $Lock = Glck->new($ResName); LOG_MSG("I", "Online.pl is about to exit with 0.", 52099); exit (0);
The solution that worked is this. I went back to using Win32::Process::Create( ) but called it with the DETACHED_PROCESS creation flag set. And this worked as I wanted it to. Online.pl called Create() and then returned '0' back to my server.
require Win32::Process; my $ParentPID; $ParentPID = $$; LOG_MSG("I", "ParentPID = $ParentPID before creating child.", 5209 +9, $ParentPID); Win32::Process::Create($ChildProc, $CMD, $CMDLine, 0, DETACHED_PRO +CESS, $CWD) || LOG_MSG("E", "Could not spawn child: $!", 52099); $ChildPID = $ChildProc->GetProcessID(); LOG_MSG("I", "ChildPID = $ChildPID", 52099, $ChildPID); my $Lock = Glck->new($ResName); $Lock->lock_mk($ChildPID); LOG_MSG("I", "Online.pl is about to exit with 0.", 52099); exit (0);
Thanks for looking into this problem for me, I hope this solution helps some of you. I am sure that I will require all of your assistance in the future ;-)

In reply to Re^2: Can't get Win32::Create::Process() parent to exit before it's children by AlphaGrey
in thread Can't get Win32::Create::Process() parent to exit before it's children by AlphaGrey

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.