English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
signal handling in external C functions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-12-21 (16:52)
From: Shaddin Doghmi <shaddin@m...>
Subject: signal handling in external C functions
I set a signal handler in ocaml to handle SIGINT. I also have some C
library functions that I wrapped using the FFI. If one of the C
functions is executing when the signal is thrown the signal is not
handled immediately. Instead, the C function continues to execute
normally, and the signal handler is invoked when the C function exits.
Is this what should be happening? What is the best way to have the
signal handled normally? Is the only way to do so to write a C signal
handler, wrap it, and invoke it from my Ocaml code before any of the C
library functions are called.