Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

is there no signal send to the father process when a child dies under win32? i created a callback (at least i think i did) but it seems not to work :
$SIG{CHLD} = \&dead_child; sub dead_child{ #do what is to be done }

Replies are listed 'Best First'.
Re: no sigchild under win32 ?
by gumby (Scribe) on Jun 17, 2002 at 14:36 UTC
    Does your sub look like this?

    sub dead_child { ... $SIG{CHLD} = \&dead_child; } $SIG{CHLD} = \&dead_child;

    Upate: At the moment, what does your sub do?

      no i dont have another callbak in the sub - why? do i need that?
        Yes, you need to reinstate the handler. Read the perlipc man page.
      concerning your updated question: it resets the status_field of my tk-frontend and opens the result-window
Re: no sigchild under win32 ?
by Anonymous Monk on Jun 17, 2002 at 15:08 UTC
    perhaps it because i didnt use fork() or open() or something like that to create the childprocess but Win32::Process::Create ?

    so is there a signal send or another way to know if such a process is trerminated ?

      The $SIG{CHLD} handler will not trap anything if you use Win32::Process. :-(
        why cant i just do something like
        END{ kill(SIGCHLD,$_parent); }
        in the child or so? in fact i tried this but i i got :
        Your vendor has not defined POSIX macro SIGCHILD, used at $scriptname +line $line
        and since my english is not too good i dont realy get what this means and what i should do