Hai everybody,

   I am getting the problem(perl.exe application error) while using the following perl 
script with fork. Can you please clarify?
windows os/ perl ver-5.6

ERROR:
The instruction at "0x023b1c53" referenced memory at "0x00000002". The memory could 
not be "read".
Click on OK to terminate the program
Click on CANCEL to debug the program.

Can you please clarify how to solve the perl.exe Application error

------------start prog--------------
use Win32::Process;
for(my $i=0;$i<=1000;$i++)
{
&execFile("1");
}

sub execFile
{
    my $FILTERFILEPATH="D:/PerlEx/perleg/Process/calledprog.pl";
   #Argument as Log file with location
    my($logfile)[EMAIL PROTECTED];
   
    #child process is created with fork.
    my $newpid = fork();
   
    #If the fork not successfull
    if( not defined $newpid )
    {
        # if return value of fork() is undef, something went wrong
        #print("fork didn't work: $!");
        die "fork didn't work: $!\n";
    }
    elsif( $newpid == 0 )
    {
        # if return value is 0, this is the child process
        sleep(1);
        print("Executing the filter.pl file\n");
        exec "perl.exe $FILTERFILEPATH $logfile";
    }
    else
    {
        print("PARENT PROCESS\n");
    }
}#end of execFile
------------end prog--------------


regards
Srinivas

This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding, printing or 
copying of this email or any action taken in reliance on this e-mail is strictly
prohibited and may be unlawful.

  Visit us at http://www.cognizant.com

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to