Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Feb 2006 17:40:43 +0000
From:      petefrench@ticketswitch.com
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/92697: connect does not restart after SIGTERM even with SA_RESTART set
Message-ID:  <E1F4LyF-000Iwb-7B@dilbert.firstcallgroup.co.uk>
Resent-Message-ID: <200602011750.k11Ho3E1001706@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         92697
>Category:       kern
>Synopsis:       connect does not restart after SIGTERM even with SA_RESTART set
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 01 17:50:02 GMT 2006
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1F4LyF-000Iwb-7B>