in reply to child process termination on Windows

Yes, use Win32::Process. Signals are part of UNIX architecture and only sort-of almost work-ish on Windows (i.e. very badly).

Win32::Process::Create sets a process object as the first parameter, and that can be used for the wait (it is documented fairly well). Here is an example:
use Win32::Process; use Win32; my $ProcessObj; my $worked = Win32::Process::Create ( $ProcessObj, # Process object "C:\\myprog", # full path name of child program "C:\\myprog arg", # command line 0, # inherit handles boolean NORMAL_PRIORITY_CLASS, # Creation flags "."); # working directory of child die 'Error: '.Win32::GetLastError() unless $worked; # Do some stuff $ProcessObj->Wait(INFINITE); # Wait for completion my $ExitCode; $ProcessObj->GetExitCode($ExitCode) # Get child result

Replies are listed 'Best First'.
Re^2: child process termination on Windows
by morgon (Priest) on Nov 19, 2009 at 10:03 UTC
    Thanks - but your Wait will block the parent process until the child exits - or does it not?

    What I want is a way to have parent and child run concurrently with the parent being informed about the child exit.

      Fair enough, in that case use $ProcessObj->GetExitCode($var) which will return STILL_ACTIVE if it is,um, still active. You will need use Win32::Process qw(STILL_ACTIVE); for that.