A question might be stupid. Is the fork() working in NT or Win98? I tried it before but failed with message the function is not supported by the OS.



-----Original Message-----
From: Tom Allebrandi [mailto:tom@ytram.com]
Sent: Friday, February 09, 2001 1:34 PM
To: perl-win32-gui-users@lists.sourceforge.net
Subject: [perl-win32-gui-users] Interesting behavior

I'm not sure if I should post this on this list or over on the Perl Win32
Users list.

Under Win32::GUI version 502 and ActiveState build 623, the following script
results in an access violation under NT 4 and an invalid page fault under
Win98. NT is only telling me a memory address where the problem is
occurring. Win98 claims that the invalid page fault is in Perl56.DLL.

        #! perl

        use Win32::GUI; # ** 1 **

        fork();                 # ** 2 **

        # The $' (or the $`) var has to be present in order to cause the crash, but
        # since it's not defined, use the "if (0)" to avoid interpreting it
        if (0)
                $';             # ** 3 **

If you take out any of the lines marked "# ** n **" the problem goes away!

At one point, I had a


as the last statement in the script. I got both of them (one from each
branch of the fork()) which suggests that the problem is occurring in the
rundown of Perl itself.

If I had to guess, something is not getting cloned properly during the
fork() and it's invalid when the GUI destructor(s) get invoked at

Cute huh?

--- Tom
Tom Allebrandi

Perl-Win32-GUI-Users mailing list