There are two ways to do the forking that Ive found that fixes your problem.
Method one: Fork with a location tag. Once the browsers receive the location tag they go away without waiting.
Example:
#!/usr/bin/perl # # do pre fork stuff here # if (fork) { # # Damn browser, go away! # print "Location: http://www.wherever.com/blah\n\n"; exit; } # # do post forking stuff here #
Method two: Disable buffering and then close STDOUT.
Example:
#!/usr/bin/perl # #disable buffering # $| = 1; # # prefork stuff # if (fork) { # # stuff to display to user. other processing that # the user needs to see, ect. # print "Content-type: text/html\n\n"; print "Done"; } # # Close STDOUT; # close STDOUT; # # work in the background #
Pete
insert into pete('red hair','green eyes','overinflated ego');
In reply to Re: (petethered) How do you tell the parent process to stop it's HTTP transfer, when it forks off a child process?
by Anonymous Monk
in thread How do you tell the parent process to stop it's HTTP transfer, when it forks off a child process?
by kleinbiker7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |