--- loncom/lonr 2009/04/18 23:43:47 1.5 +++ loncom/lonr 2014/10/30 19:09:06 1.7 @@ -3,7 +3,7 @@ # The LearningOnline Network with CAPA # Connect to R CAS # -# $Id: lonr,v 1.5 2009/04/18 23:43:47 www Exp $ +# $Id: lonr,v 1.7 2014/10/30 19:09:06 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -275,9 +275,9 @@ sub make_new_child { &status('Accepting connections'); my $client = $server->accept() or last; &sync($command); -# print $command ("display2d:false;simp:true;kill(all);\n"); -# &getroutput($command,2); -# &sync($command); + print $command ("library(phpSerialize);\n"); + &getroutput($command); + &sync($command); my $syntaxerr = 0; while (my $cmd=<$client>) { &status('Processing command'); @@ -329,7 +329,7 @@ sub make_new_child { sub getroutput { my ($command)=@_; - my $regexp = '>'; + my $regexp = '>\s+$'; my $syntaxerr=0; my $timeout = 20; my (undef,$error,$matched,$output) =