From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 46430BC88 for ; Tue, 1 Feb 2005 13:19:01 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j11CJ0uB015334 for ; Tue, 1 Feb 2005 13:19:00 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA04369 for ; Tue, 1 Feb 2005 13:19:00 +0100 (MET) Received: from home.mk.pp.ru (av6800.comex.ru [217.10.34.155]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j11CIxfP015325 for ; Tue, 1 Feb 2005 13:18:59 +0100 Received: from ermine.home (ermine.home [192.168.2.2]) by home.mk.pp.ru (Postfix) with ESMTP id CC4E120B2B; Tue, 1 Feb 2005 15:18:58 +0300 (MSK) Received: by ermine.home (Postfix, from userid 1001) id E70333A9F67; Tue, 1 Feb 2005 15:22:13 +0300 (MSK) Date: Tue, 1 Feb 2005 15:22:13 +0300 From: Anastasia Gornostaeva To: Ville-Pertti Keinonen Cc: caml-list Subject: Re: [Caml-list] timer Message-ID: <20050201122213.GA82702@ermine.home> References: <20050103015835.GA22656@ermine.home> <41D9ED2A.8080906@compiler.kaist.ac.kr> <20050131193324.GA77148@ermine.home> <1107244235.669.11.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <1107244235.669.11.camel@localhost> User-Agent: Mutt/1.5.6i X-Miltered: at concorde with ID 41FF73B4.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 41FF73B3.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 wrote:01 ocaml:01 libs:01 native-code:01 libc:01 libc:01 libpthread:01 stdio:01 sig:01 handler:01 stderr:01 fprintf:01 stderr:01 argc:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.2 X-Spam-Level: On Tue, Feb 01, 2005 at 09:50:35AM +0200, Ville-Pertti Keinonen wrote: > > > Module Timer > > > > > > > This module does not work when is compiled for native-code mode and is linked > > with libc_r under FreeBSD 5.x > > Did you intentionally link against libc_r, or are you running a > pre-stable version of 5.x? > > libpthread is the default for FreeBSD 5.x since before becoming the > stable branch and 6-current, and it should work correctly (verified for > -current). I have different FreeBSDs, 5.2rc2 and 5.3-release. On 5.2rc2 using libc_r is by default but just now I use libmap.conf only for ocaml-compiled programs to use pthreads. I still dont believe it is only freebsd related problem if i use freebsd 5.2rc2 for long time and with wide range of sowtware without problems. For example, on my machine there is running Zope based on python 2.1, that is linked against libc_r. Well, i dont know if it uses signals ... How can I reproduce this problem on C? A probram below does not lose signals #include #include void sig_handler(int s) { // stderr is preferred because it is non-buffered fprintf(stderr, "Got signal: %d\n", s); } int main(int argc, char ** argv) { printf("Starting...\n"); signal(SIGALRM, sig_handler); signal(SIGUSR1, sig_handler); signal(SIGUSR2, sig_handler); printf("Handlers installed...\n"); while(1) { if(!sleep(5)) fprintf(stderr, "tick!\n"); else perror("sleep"); } } Compilation: gcc test.o -o test -pthread gcc test.o -o test -lc_r and playing with library mapping in libmap.conf Using: run it ad manually send killall -SIGALRM test All is fine. ermine