From petefrench@ticketswitch.com  Wed Feb  1 17:40:47 2006
Return-Path: <petefrench@ticketswitch.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id F1C2F16A440
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  1 Feb 2006 17:40:46 +0000 (GMT)
	(envelope-from petefrench@ticketswitch.com)
Received: from mail.ticketswitch.com (mail.ticketswitch.com [194.200.93.188])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 6B61043D55
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  1 Feb 2006 17:40:46 +0000 (GMT)
	(envelope-from petefrench@ticketswitch.com)
Received: from [172.16.1.6] (helo=dilbert.firstcallgroup.co.uk)
	by mail.ticketswitch.com with esmtp (Exim 4.52 (FreeBSD))
	id 1F4LyH-0006YJ-Cq
	for FreeBSD-gnats-submit@freebsd.org; Wed, 01 Feb 2006 17:40:45 +0000
Received: from petefrench by dilbert.firstcallgroup.co.uk with local (Exim 4.52 (FreeBSD))
	id 1F4LyF-000Iwb-7B
	for FreeBSD-gnats-submit@freebsd.org; Wed, 01 Feb 2006 17:40:43 +0000
Message-Id: <E1F4LyF-000Iwb-7B@dilbert.firstcallgroup.co.uk>
Date: Wed, 01 Feb 2006 17:40:43 +0000
From: petefrench@ticketswitch.com
Reply-To: petefrench@ticketswitch.com
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: connect does not restart after SIGTERM even with SA_RESTART set
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         92697
>Category:       kern
>Synopsis:       [libc] connect(2) does not restart after SIGTERM even with SA_RESTART set
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    yar
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 01 17:50:02 GMT 2006
>Closed-Date:    Thu Feb 02 10:52:32 GMT 2006
>Last-Modified:  Thu Feb 02 10:52:32 GMT 2006
>Originator:     Pete French
>Release:        FreeBSD 6.0-RELEASE i386
>Organization:
TicketSwitch Ltd
>Environment:
System: FreeBSD dilbert.rattatosk 6.0-RELEASE FreeBSD 6.0-RELEASE #2: Thu Dec 15 11:40:48 GMT 2005 petefrench@dilbert.rattatosk:/usr/obj/usr/src/sys/P4-SMP-WORKSTATION i386


>Description:

	If you catch SIGTERM using sigaction, with the SA_RESTART
	flag set, and then send a SIGTERM to a process during a connect()
	call, the call returns with EINTR rather than restarting. It is
	unclear from the manpage what is supposed to happen - I *think*
	that this is not the intended behaviour, as I was under the
	impression that EINTR cound not be returned if SA_RESTART was set.
	But I may be totally wrong on this - though if so possibly a note
	should be made in the documentation to this effect.

>How-To-Repeat:
	send a SIGTERM to a process during a connect()

>Fix:
	Workaround is to write your code to expect this and handle it as
	you would EINPROGRESS.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: yar 
State-Changed-When: Thu Feb 2 10:50:33 UTC 2006 
State-Changed-Why:  
: From: Pete French <petefrench@ticketswitch.com> 
: To: yar@comp.chem.msu.su 
: Subject: Re: Restartable system call behaviour 
: Date: Thu, 02 Feb 2006 10:20:01 +0000 
: Cc: freebsd-stable@freebsd.org, ivoras@fer.hr, peterjeremy@optushome.com.au 
:  
: > To the best of my knowledge, connect() being always interruptable 
: > is correct and well-known. 
:  
: Fair enough, that answers my question! 


Responsible-Changed-From-To: freebsd-bugs->yar 
Responsible-Changed-By: yar 
Responsible-Changed-When: Thu Feb 2 10:50:33 UTC 2006 
Responsible-Changed-Why:  
I closed it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92697 
>Unformatted:
