ChezScheme icon indicating copy to clipboard operation
ChezScheme copied to clipboard

feature request: FFI for forward_signal_to_scheme

Open NHALX opened this issue 2 years ago • 1 comments

Is there a public interface for forwarding signals to the chez runtime?

My specific use case is that I'm trying to handle keyboard interrupts for two different embedded runtimes simultaneously (Chez and SWI Prolog), so the top-level signal handler needs to route the signal to the correct runtime depending on which is currently active.

NHALX avatar Jul 11 '22 18:07 NHALX

Do you mean expose the (currently internal) forward_signal_to_scheme C function in the public C API (presumably as Sforward_signal_to_scheme or similar to match the naming conventions)? I'm not super familiar with the C interface for embedding Chez, but it seems like that would pretty straightforward. I'm thinking edits near where the other "customization" functions (like Sschene_init) are in c/schsig.c, s/mkheader.ss, and csug/foreign.stex if anyone wants to take a stab at it.

jltaylor-us avatar Jul 18 '22 00:07 jltaylor-us