Branch: Tag:

2003-09-16

2003-09-16 17:48:15 by Martin Stjernholm <mast@lysator.liu.se>

Use stdin/stdout instead of a custom fd as command channel. This fixes the
perl support on NT, [bug 3453 (#3453)].

Rev: server/etc/modules/ExtScript.pmod:1.17
Rev: server/perl/bin/perlhelper:1.7

2:      # Perl helper script for Roxen Webserver. By Leif Stensson.   # - # $Id: perlhelper,v 1.6 2001/04/18 12:48:59 leif Exp $ + # $Id: perlhelper,v 1.7 2003/09/16 17:48:15 mast Exp $      package Roxen::Internal;   
271:      use IO::Handle;    - my ($infd, $outfd) = (-1, -1); +    my ($cmdin ) = (new IO::Handle);   my ($cmdout) = (new IO::Handle);    - for(; $ARGV[0] =~ /^-/; shift @ARGV) - { if ($ARGV[0] =~ /^--cmdsocket=(\d+)$/) -  { $infd = $1; $outfd = $1;} -  else -  { die "Invalid option: $ARGV[0]\n";} - } + # for(; $ARGV[0] =~ /^-/; shift @ARGV) + # { if ($ARGV[0] =~ /^--cmdsocket=(\d+)$/) + # { $infd = $1; $outfd = $1;} + # else + # { die "Invalid option: $ARGV[0]\n";} + # }      sub diag   {
366:   { my ($cmd, $var, $len, $data) = ();    my ($starttime, $runcount) = (time, 0);    -  $cmdin->fdopen($infd, "r") or die "Unable to open command input.\n"; -  $cmdout->fdopen($outfd, "w") or die "Unable to open command output.\n"; +  $cmdin->fdopen(0, "r") or die "Unable to open command input.\n"; +  $cmdout->fdopen(1, "w") or die "Unable to open command output.\n";    $cmdout->autoflush(1);       $Roxen::Request::req_req = Roxen::Request->new();
450:    if ($cmd eq "P")    { Sendreply(""); }    elsif ($cmd eq "V") -  { Sendreply('Roxen Perl Helper: $Id: perlhelper,v 1.6 2001/04/18 12:48:59 leif Exp $'); } +  { Sendreply('Roxen Perl Helper: $Id: perlhelper,v 1.7 2003/09/16 17:48:15 mast Exp $'); }    else    { die "perlhelper $$/MLQQ: exiting.\n"; }    }