esr has asked for the wisdom of the Perl Monks concerning the following question:
Here is a snippet of the test case code:
The message box appears correctly. The output in the "Run" (aka Command Prompt) window from which the program is started is as follows:$| = 1; if ($pid = fork) { print "this is the parent $pid\n"; while ($prange ne '$A$3') { eval {$prange = $excel->ActiveCell->{Address};}; print "$@\n" if ($@); print "Active cell address $prange\n"; sleep 3; } } elsif (defined $pid) { print "this is the child $pid\n"; $msg = "When finished editing, close the file\."; Win32::MsgBox("$msg",vbOKOnly,$mbt); #$ans = <STDIN>; exit; } else { print "fell through\n"; }
and that continues until I click on "OK" in the message box. At that point I get the following messages:this is the parent -2072 this is the child 0 Active cell address $C$23 Active cell address $C$23
If I uncomment the "$ans = <STDIN>;" statement I get the same error messages but they now say:Attempt to free non-existent shared string 'Range' at <eval 1> line 1. Free to wrong pool 1e5da80 not 223f90 at <eval 1> line 1.
If I comment out the "exit" statement in the child block I immediately get the window that says the "Perl Command Line Interpreter has encountered a problem and needs to close" and asks if I want to send a report to Microsoft. In this case the command prompt window has this very interesting error message:Attempt to free non-existent shared string 'Range' at <eval 1> line 1, + <STDIN> line 1. Free to wrong pool 1e5dce0 not 223f90 at <eval 1> line 1, <STDIN> line + 1.
I then get "Active cell address" output every 3 seconds until I click on "Don't send" to Microsoft box. Then the Perl program terminates.Undefined subroutine &Carp::shortness_heavy called at c:/Perl/lib/Carp +.pm line 182. Free to wrong pool 1e5da30 not 223f90.
Is there something basic that I am missing?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Fork in Win32 environment
by Corion (Patriarch) on Jun 27, 2006 at 20:34 UTC | |
|
Re: Fork in Win32 environment
by bart (Canon) on Jun 28, 2006 at 09:22 UTC | |
|
Re: Fork in Win32 environment
by radiantmatrix (Parson) on Jun 29, 2006 at 17:57 UTC |