Solved

How to ensure a CGI process completes?

Posted on 1997-04-20
1
203 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn how to count occurrences of each item in an array.

717 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