Browse thread
signal handling in external C functions
- Shaddin Doghmi
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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.