From owner-freebsd-bugs@FreeBSD.ORG Wed Feb 1 17:50:04 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 740F416A420 for ; Wed, 1 Feb 2006 17:50:04 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BF6343D46 for ; Wed, 1 Feb 2006 17:50:03 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k11Ho3wZ001707 for ; Wed, 1 Feb 2006 17:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k11Ho3E1001706; Wed, 1 Feb 2006 17:50:03 GMT (envelope-from gnats) Resent-Date: Wed, 1 Feb 2006 17:50:03 GMT Resent-Message-Id: <200602011750.k11Ho3E1001706@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, 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 ; 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 ; 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: Date: Wed, 01 Feb 2006 17:40:43 +0000 From: petefrench@ticketswitch.com To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/92697: connect does not restart after SIGTERM even with SA_RESTART set X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: petefrench@ticketswitch.com List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2006 17:50:04 -0000 >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: