One more attempt: stuck processes

Ken Murchison murch at
Tue Nov 20 09:20:42 EST 2007

Gary Mills wrote:
> On Mon, Nov 19, 2007 at 12:35:46PM -0500, Ken Murchison wrote:
>> Sebastian Hagedorn wrote:
>>> -- Ken Murchison <murch at> is rumored to have mumbled on 
>>> 17. November 2007 11:21:38 -0500 regarding Re: One more attempt: stuck 
>>> processes:
>>>> Here's a patch that seems to fix the problem.  I did some basic testing
>>>> (Linux only) to make sure that it doesn't break anything else, but its
>>>> always possible that it has some unforseen side effects.  Keep an eye on
>>>> it and let me know if you see anything unusual.
>>> Thanks, it seems to be working fine so far! Enjoy your weekend now ...
>> Gary, have you tried the patch?
> On Solaris 9, SO_RCVTIMEO is not mentioned in the setsockopt man page.
> My reading tells me that it is defined in the header file, but if it's
> actually used, setsockopt() will return an error.  I understand that
> this is the case for other operating systems too.  This seems to be a
> known problem with setsockopt().  I just checked the Opensolaris source;
> it does function there.  This is the code:
>  	 case SO_RCVTIMEO:
> 		if (optlen == sizeof (uint32_t))
> 	   	      sockets[i].in_timeout = *(uint32_t *)optval;
>        	        else {
> 			errno = EINVAL;
> 	      	}
> 		break;
> Note that the option has to be an int, and the length has to be
> that of an int as well.  Linux wants a `struct timeval'.  I wonder
> if there's a standard in this area?

OK.  Can you both try this alternate patch?  It should be portable, and 
GDB shouldn't cause it to kick out.  I've set it up so that for 
SSL-wrapped services it will timeout after 3 minutes, otherwise it uses 
the service-specific timeout.

Kenneth Murchison
Systems Programmer
Project Cyrus Developer/Maintainer
Carnegie Mellon University
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SSL_accept_nonblock.diff
Type: text/x-diff
Size: 8542 bytes
Desc: not available
Url : 

More information about the Info-cyrus mailing list