Solved

How to ensure a CGI process completes?

Posted on 1997-04-20
1
169 Views
Last Modified: 2013-12-25
Hi,

I'm using a Perl program to interface with a flat text database.  All works great 99.9% of the time.

The problem is that if a user loses their connection to our server during the "writing back to disk" phase of the software the CGI task is terminated.  This causes the data on disk to be chopped off.

We are running under Apache 1.2b7...Is there any way to ensure that a CGI task will finish once it is started, or perhaps a modified CGI handler for Apache that won't stop a task when a connection is lost?
0
Comment
Question by:jrusnak
1 Comment
 
LVL 1

Accepted Solution

by:
OM earned 100 total points
ID: 1827929
This depends on the way you are using your perl program
(input, output, etc.)
Nervertheless, you could use the following tricks,
or a similar one.
Use the following CGI instead of yours:
#!/bin/sh
/you/cgi/here &
wait

Hope this helps
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now