Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: -- (:)
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.