Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Anastasia Gornostaeva <ermine@ermine.pp.ru>
To: Ville-Pertti Keinonen <will@exomi.com>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] timer
Date: Tue, 1 Feb 2005 15:22:13 +0300	[thread overview]
Message-ID: <20050201122213.GA82702@ermine.home> (raw)
In-Reply-To: <1107244235.669.11.camel@localhost>

On Tue, Feb 01, 2005 at 09:50:35AM +0200, Ville-Pertti Keinonen wrote:

> > >  Module Timer
> > >  <http://pllab.kaist.ac.kr/%7Eshoh/ocaml/libs/timer/doc/type_Timer.html>
> > 
> > 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 <signal.h>
#include <stdio.h>

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


  reply	other threads:[~2005-02-01 12:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-03  1:58 timer Anastasia Gornostaeva
2005-01-04  1:11 ` [Caml-list] timer SooHyoung Oh
2005-01-31 19:33   ` Anastasia Gornostaeva
2005-01-31 21:21     ` Alain Frisch
2005-02-01  7:50     ` Ville-Pertti Keinonen
2005-02-01 12:22       ` Anastasia Gornostaeva [this message]
2005-02-01 14:30         ` Ville-Pertti Keinonen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050201122213.GA82702@ermine.home \
    --to=ermine@ermine.pp.ru \
    --cc=caml-list@inria.fr \
    --cc=will@exomi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox