[In Gauche]: > Yes, we have our own C wrappers for many POSIX calls that also handles > signals, restarts, architecture-dependent stuff, etc. FFI calls to > POSIX APIs would duplicate such code, so I'd like to use the > existing code for srfi-170 as well. > And those C wrappers longjmp (we have our own macros for C stack unwinding.) Would it be difficult if the C wrapper always take an extra symbol that says which Scheme procedure called them? If such a C wrapper returns an error, it could return the given symbol as part of the error object.