From owner-freebsd-hackers Wed Jan 22 19:38: 3 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E3E537B401 for ; Wed, 22 Jan 2003 19:38:01 -0800 (PST) Received: from mail.rdslink.ro (mail.rdslink.ro [193.231.236.20]) by mx1.FreeBSD.org (Postfix) with SMTP id A42FC43ED8 for ; Wed, 22 Jan 2003 19:37:59 -0800 (PST) (envelope-from enache@rdslink.ro) Received: (qmail 18448 invoked from network); 23 Jan 2003 03:36:55 -0000 Received: from unknown (HELO ratsnest.hole) (213.157.186.188) by mail.rdslink.ro with SMTP; 23 Jan 2003 03:36:55 -0000 Received: from ratsnest.hole (localhost [127.0.0.1]) by ratsnest.hole (8.12.5/8.12.5) with ESMTP id h0N3SXeq005083 for ; Thu, 23 Jan 2003 05:28:34 +0200 Received: (from adi@localhost) by ratsnest.hole (8.12.5/8.12.5/Submit) id h0N3SXmF005081 for hackers@freebsd.org; Thu, 23 Jan 2003 05:28:33 +0200 Date: Thu, 23 Jan 2003 05:28:33 +0200 From: Enache Adrian To: hackers@freebsd.org Subject: signals lost when linked with libc_r ? Message-ID: <20030123032833.GA5075@ratsnest.hole> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG FreeBSD seems to loose signals in programs linked with libc_r. sigaction.c ( freely translated from Perl's ext/POSIX/t/posix.t test) -----------------8x---------------------- #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; } -----------------8x----------------------- csh# cc sigaction.c -o sigaction csh# ./sigaction sigint delayed ... SIGINT ! * csh# cc -lc_r sigaction.c -o sigaction csh# ./sigaction sigint delayed ... * (this is -CURRENT, cvsup'ed 3 days ago) Please enlighten me. Adi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message