Nike,
fork does not work very well in Windows NT, I would guess that is
where the problem
would be. As for how to launch 3 processes at the same time without fork,
you got me.
Steve K
> -----Original Message-----
> From: Nike Borzov [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, March 28, 2001 3:43 AM
> To: [EMAIL PROTECTED]
> Subject: fork+HTTP::Request=perl.exe crash. help!
>
> Just trying GET three http://perl.com/ at the same time.
>
> The next simple code crashes Perl.exe
> The instruction at "0x28073b9f" referenced memory at "0x03277b8c". The
> memory
> could not be "read".
> Click on OK to terminate the program
> Click on CANCEL to debug the program
>
>
> <code>
> use LWP::UserAgent;
>
> my $pid = fork();
> for (1..3) {
> if ($pid = fork()) { next; }
> if (defined $pid) { GET(); exit; }
> else { die "Fork failed\n"; }
> }
>
> sub GET {
> my $ua = LWP::UserAgent->new;
> $ua->agent("Perl 5.6");
> my $req = HTTP::Request->new("GET", "http://perl.com/");
> my $res = $ua->request($req);
> if ($res->is_success) { print "OK\n"; return $res->content; }
> else { die "HTTP::Request error"; }
> }
> </code>
>
> Please help me resolve it.
>
> ps:You can suggest to use ParallelUA, but it's not possible in my case.
>
> Thanks.
> _______________________________________________
> ActivePerl mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/activeperl
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl