in reply to Re: Re: Re: Embedded redirection
in thread Embedded redirection

This code finally worked.
my $result= new CGI; print $result->redirect("http://www.example.com"); close STDOUT; my $pid = fork; exit if $pid; die "fork: $!" unless defined $pid;
However, is this the most efficient way of doing things? Is it going to clog the system up if the script is accessed very freqeuntly? Thanks.

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Embedded redirection
by Fastolfe (Vicar) on Jan 13, 2001 at 07:50 UTC
    It won't have any measurable impact on your system. Remember, the total number of processes running remains the same. The parent exits just as it spawns the child. All you're changing is that the child continues working in the background while the parent exits gracefully, allowing the HTTP request to complete.