Re: [users@httpd] CGI help on apache needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
 Hugh Williams                  "There are two things to aim for in life;
 hugh_williams@xxxxxxxxxxx       first, to get what you want; and after that,
 Agilent Technologies            to enjoy it.  Only the wisest of mankind
 Santa Rosa 2US-C                achieve the second."
 707.577.4941                         - Logan Pearsall Smith, 1931

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux