From owner-freebsd-bugs Mon Mar 10 13:30:15 2003 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 17B5837B401 for ; Mon, 10 Mar 2003 13:30:12 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 16C6543FB1 for ; Mon, 10 Mar 2003 13:30:11 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h2ALUANS046249 for ; Mon, 10 Mar 2003 13:30:10 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h2ALUAXX046248; Mon, 10 Mar 2003 13:30:10 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC22737B401 for ; Mon, 10 Mar 2003 13:23:03 -0800 (PST) Received: from mail.rdslink.ro (mail.rdslink.ro [193.231.236.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 3D3A443F3F for ; Mon, 10 Mar 2003 13:23:02 -0800 (PST) (envelope-from enache@rdslink.ro) Received: (qmail 28337 invoked from network); 10 Mar 2003 21:23:48 -0000 Received: from unknown (HELO ratsnest.hole) (81.196.245.110) by mail.rdslink.ro with SMTP; 10 Mar 2003 21:23:48 -0000 Received: from ratsnest.hole (localhost [127.0.0.1]) by ratsnest.hole (8.12.5/8.12.5) with ESMTP id h2ALSZil000873; Mon, 10 Mar 2003 23:28:37 +0200 Received: (from adi@localhost) by ratsnest.hole (8.12.5/8.12.5/Submit) id h2ALSYqN000869; Mon, 10 Mar 2003 23:28:34 +0200 Message-Id: <20030310212834.GA827@ratsnest.hole> Date: Mon, 10 Mar 2003 23:28:34 +0200 From: Enache Adrian Reply-To: Enache Adrian To: FreeBSD-gnats-submit@FreeBSD.org Cc: enache@rdslink.ro Subject: bin/49087: Signals lost in programs linked with libc_r Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 49087 >Category: bin >Synopsis: Signals lost in programs linked with libc_r >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Mar 10 13:30:10 PST 2003 >Closed-Date: >Last-Modified: >Originator: Enache Adrian >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: System: FreeBSD ratsnest.hole 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Thu Feb 13 15:39:05 EET 2003 root@ratsnest.hole:/opt/tmp/CUBATAO i386 >Description: FreeBSD seems to lose blocked signals in programs linked with libc_r. This bug shows up when running the perl test suite with a multithreaded perl ( i.e. linked to libc_r.so ), more precisely at test 11 of ext/POSIX/t/posix.t. >How-To-Repeat: Built the test program below ( freely translated from Perl's test) with/without -lc_r ( or -pthread ) and run it. On my -current box, I get: $ cc sig.c -o sig $ ./sig sigint delayed ... SIGINT ! * $ cc -lc_r sig.c -o sig $ ./sig sigint delayed ... * -----< sig.c >--------------------------------------------------- #include #include #include void sighup(int dummy) { kill(getpid(),SIGINT); sleep(1); printf("sigint delayed ...\n"); } void sigint(int dummy) { printf("SIGINT !\n"); } struct sigaction act; int main() { act.sa_handler = sighup; sigaddset(&act.sa_mask, SIGINT); sigaction(SIGHUP, &act, NULL); signal(SIGINT,sigint); kill(getpid(),SIGHUP); sleep(2); printf("*\n"); return 0; } ----------------------------------------------------------------- >Fix: Any pointers appreciated. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message