Return a value while continuing
Return a value while continuing
- Subject: Return a value while continuing
- From: Simon Forster <email@hidden>
- Date: Thu, 01 Mar 2001 17:35:02 +0000
I've written a simple cgi which is rapidly becoming a bit of a monster. Part
of the feature creep I'm introducing is that it'd be neat to return a value
to the web server fairly promptly while continuing with some further
processing behind the scenes.
So, I have my handler which accepts arguments from the web server. Quick bit
of error checking and then I'd like to return a header while the script
quietly completes the task in its own time.
Problem: As soon as you hit a "return xxx" statement, the script stops.
The only way I can see around this is to have a second script application to
which I pass some arguments. Using "ignoring application responses" I should
be able to return a value to the web server while the helper app gets on
with processing the request. However, this doesn't seem very elegant and I
could run into trouble if the helper app got split from the handler app.
How does one deal with this?
TIA
Simon Forster
________________________________________________
LDML Ltd, 28 Montgomery Road, London, W4 5LZ, UK
<tel int="+44 20 8995 5694" uk="020 8995 5694">
<fax int="+44 20 8995 6013" uk="020 8995 6013">
<
mailto:email@hidden>
________________________________________________