httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: [users@httpd] CGI help on apache needed
Date Wed, 05 Jul 2006 16:12:35 GMT
It sounds like a bug, but for good measure, try closing both STDOUT and
the STDERR handle.

Rajat Sharma wrote:
> Intrestingly,
> 
> Even if CGI is told to print instantly, the apache knows that the "long
> job" is doing something and might need to print out. This is why it
> waits for the "long job" to be over before it releases the STDOUT pipe.
> 
> I thought I will fork it, close the PIPE on child which is supposed to
> do the long job so that apache doesn't wait for it. 
> 
> At this time child will continue to do the long job. Apache releases the
> pipe held by the parent and IE dislays the new page.
> 
> Interestingly, it is not helping
> 
> Raj
> 
> 
> 
> 
> -----Original Message-----
> From: Hugh Williams [mailto:hughw@soco.agilent.com] 
> Sent: Wednesday, July 05, 2006 11:29 AM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] CGI help on apache needed
> 
> Is there really a need to use forking?  Instead, how about:
> 
>  1. CGI prints instant reply.
>  2. CGI execs long job (you *are* using exec and not system, right?),
> and 
>      exits.
>  3. long job sends mail (exec or system or a subroutine) when it's done.
> 
> You'd need to pass $loginid to the long job of course.
> 
> hugh
> 
> Rajat Sharma wrote:
>> Script looks something like below
>>
>> 1. print ("Location: http://XYZ:9090/Project/filepath.html\n\n");
>> 2. close(STDOUT);
>> 3. my $pid = fork;
>>
>> 4. $pid = 0 unless defined $pid;   # be the kid if fork failed
>>
>> 5. exit 0 if $pid;
>>
>> ## child...
>>
>> 6. close(STDOUT);
>>
>> ### LONG DIRTY JOB START
>> 7. exec "la_results.pl $input{'dirPath'} $checkboxString";
>> ### LONG DIRTY JOB OVER
>>
>> 8. mail.pl $loginId ## MAIL THE NOTIFICATION
>>
>> Issue is that the after submit of the page, the IE still keeps loading
>> the page until the long\dirty job is over.
> 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message