Re: OS Error: Interrupted system call

Stanley Gambarin (gambarin@openmarket.com)
Fri, 01 Nov 1996 19:32:40 -0500

Message-Id: <199611020032.TAA07377@u4-138.openmarket.com>
To: freeform <freeform@wired.com>
Subject: Re: OS Error: Interrupted system call 
In-Reply-To: Your message of "Wed, 30 Oct 1996 12:51:28 PST."
             <Pine.BSI.3.95.961030124847.27235I-100000@get.wired.com> 
Date: Fri, 01 Nov 1996 19:32:40 -0500
From: Stanley Gambarin <gambarin@openmarket.com>

> occasionally one of my FastCGI scripts
> becomes hosed and starts spitting out errors of the following:
> 
> [Wed Oct 30 12:41:16 1996] access to /usr/local/etc/httpd/fcgi-bin/subd failed for 204.174.245.129, reason: mod_fastcgi: Could not connect to application, OS error 'Interrupted system call'
> 
> anyone have these problems,
> and know how to fix them?
> 
> {freeform}
> 
	The possible culprit in the above case is the faulty accept() call.
In fcgiapp.c, in the function FCGX_Accept, there is a call to system 
accept() function to acquire the connection from the server.  This function
will fail if the signal is recieve during its execution, resulting in 
errno=EINTR and corresponding message : Interrupted system call.  One possible
solution is to provide a loop as follows:

	do {
 		call accept() here;
	while (errno == EINTR);

	However, the above solution has not been tested, so if anyone would
be willing to test it, we would like for you to share the results.

-- 

*******************************************************************************
* Stanley Gambarin			Open Market Inc.		      *
* FastCGI (soon-to-be) Guru		245 First St. Cambridge MA 02142      *
*					(617) - 374 - 6565		      *
* mailto://gambarin@openmarket.com					      *
* 				http://acs2.bu.edu:8001/~stanleyg (school)    *
*				mailto://stanleyg@cs.bu.edu		      *
*******************************************************************************