Solved

How to ensure a CGI process completes?

Posted on 1997-04-20
1
198 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

732 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