Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CGI Timeout

Status
Not open for further replies.

CFtaxtron

Programmer
May 26, 2001
19
CA
Help, I have setup a basic fork and everythig runs fine until the end when I get the error message.

CGI Timeout
The specified CGI application exceeded the allowed time for processing. The server has deleted the process.

Here's the code that I'm using.

#! d:\perl\bin\perl.exe

print "Content-type: text/html\n\n";

unless ($pid = fork) {
unless (fork) {
exec "techsurvey.pl";
die "no exec";
print "Hello";
exit 0;
}
exit 0;
}
waitpid($pid,0);

Any help to get rid of the error message would be greatly appreciated.

Tim
 
There are several parts of your code that I don't understand.

You do a fork to create a child process.
Then, in that child, you do an 'exec'. That 'exec' terminates the child and runs 'techsurvey.pl'. At that point, your child no longer exists.
Then, you do a 'die' which I think has no effect because
you already killed the child process with the 'exec'.

I'm not sure what you are trying to do. Can you annotate it a little so we can get an idea?

If you are new to Tek-Tips, please use descriptive titles, check the FAQs,
and beware the evil typo.
 
that looks ok to me actually - the die will only get run if the script continues past the exec, if the exec fails in other words.

Does the server tell you which process it's killed off? I'd bet it's the child that's having some sort of problem and looping like mad. Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top