
MichaelBluejay
New User
Feb 3, 2013, 10:15 AM
Post #5 of 6
(1443 views)
|
Re: [MichaelBluejay] Web page stalls on: print "Location:mydomain\n\n"
[In reply to]
|
Can't Post
|
|
(1) Why is it necessary to fork? (2) The code works fine if I redirect to another domain, just not to my own domain. Should I be forking when redirecting to another domain too, even though it appears to work perfectly without forking? (3) Does the fact that redirects to another domain work fine suggest that the problem with redirecting within my domain is not a forking problem, but rather something else? (4) I looked up forking and tried the following code, and now the redirect happens right away, but the forked code doesn't execute (i.e., the file is not created).
#! /usr/bin/perl if ($pid = fork) { } else { close STDOUT(); open(FILE,'>test.txt'); print FILE time; close(FILE); exit(0); } print "Location: http://mydomain.com/\n\n";
|