cgi long running jobs

Vineeth S vineeth at
Tue Oct 12 11:53:17 CEST 2004

Thomas Guettler <guettli at> wrote in message news:<pan.2004. at>...
> Am Sun, 03 Oct 2004 07:01:50 -0700 schrieb Vineeth S:

> > What I tried initially was a client-pull, where with the first "please
> > wait" I would send a refresh header with a flag as parameter, and then
> > use that flag to check for completion, else send a new "please wait
> > <blah>". This did not work, I am guessing, because the request and the
> > subsequent process has been tied to that session, am I correct ?
> Hi,
> How do you check the flag?

I check to see if the form has this variable

> You can do it like this:
> One script or method called "startProcess": Start the
> real work in background (os.system(".... 2>&1 &")).
> This returns a redirect to "waitForProcess?id=..."

Ah, I didnt think of backgrounding the job. But I am wondering will
apache release control to another script or page ? In the sequential
nature of things it should. I will try this.
> > Going by that reasoning, I tried a fork-exec to run the long job, and
> > periodically check for completion from the parent. This does not work
> > either, and this has foxed me. Is it because fork-exec in the cgi
> > context has some other behaviour ?
> What kind of session-management do you use?

I did not understand what exactly you meant by session-management.

> HTH,
>  Thomas

Thanks and regards

More information about the Python-list mailing list