Mailing List Archive

Hanging Perl processes using NT Perl with CGI
We've been using NT Perl with CGI to simple put an HTML page from a
file (see spew.pl). This is invoked from a .bat file, which simply
invokes perl and exits. When we look at the server, there are all
these hanging PERL.EXE processes around, which never go away. Has
anyone else experienced this?
Using Netscape server (1.1 with patches).

Thanks,

Bob Beauchemin
bobb@udp.com

# spew.pl -- spit back the html file requested. # $Revision$

# Pull in the cgi interface stuff
require 'cgi-lib.pl';

# Read and parse the standard input
&ReadParse();

# Get the value of the filename field
$filename = 'c:\\netscape\\ns-home\\docs\\'.$in{'Filename'};

# Try to open the file
if (!open(IN, "<$filename"))
{
print "Content-type: text/html\n\n"; print <<EOH;
<HTML><HEAD><TITLE>Internal error</TITLE></HEAD><BODY> <H1>Internal
error</H1>
<P>Can not open file $filename. Complain to the author of the
previous page.
</P></BODY></HTML>
EOH
exit(1);
}

# The file has been opened -- send it back. print "Content-Type:
text/html\n\n";
while (read(IN, $buf, 16384))
{
print $buf;
}


exit(0);