--- loncom/lonmaxima 2006/03/04 02:33:54 1.7 +++ loncom/lonmaxima 2006/03/04 06:44:11 1.8 @@ -3,7 +3,7 @@ # The LearningOnline Network with CAPA # Connect to MAXIMA CAS # -# $Id: lonmaxima,v 1.7 2006/03/04 02:33:54 www Exp $ +# $Id: lonmaxima,v 1.8 2006/03/04 06:44:11 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -52,10 +52,8 @@ my $pidfile; # my $port; # path to UNIX socket file my %perlvar; # configuration file info my $lastlog; # last string that was logged -my $maximapid; # PID of maxima process -my $selector; # open3's selector use vars qw($PREFORK $MAX_CLIENTS_PER_CHILD %children $children $status - $pidfile $port %perlvar $lastlog $maximapid $selector); + $pidfile $port %perlvar $lastlog); sub maximareply { my ($cmd) = @_; @@ -66,7 +64,7 @@ sub maximareply { unless ($cmd=~/\;\n$/) { $cmd.=";\n"; } my ($cmd_in, $cmd_out, $cmd_err); - $maximapid = open3($cmd_in, $cmd_out, $cmd_err, 'maxima'); + my $maximapid = open3($cmd_in, $cmd_out, $cmd_err, 'maxima'); $children{$maximapid} = 1; print $cmd_in $cmd; @@ -78,7 +76,7 @@ sub maximareply { alarm(5); no strict 'refs'; - $selector = IO::Select->new(); + my $selector = IO::Select->new(); $selector->add($cmd_err, $cmd_out);