Lisp HUG Maillist Archive

Trapping foreign calls to exit()

Is it possible to trap these so LispWorks doesn't just quit? I found a ..ps file talking about doing this, but it was from 2004 using a very old LW FFI and a foreign-callable that doesn't even match the current define-foreign-callable.

Thanks for any thoughts.

Jeff M.

Re: Trapping foreign calls to exit()

Note:

If I define a foreign callable which throws an error and passed it to atexit(). Calling exit on my own seems to trap it, throw the error and not exit LispWorks. Yet, when exit() is called from the foreign library, it still quits…

Jeff M.

On Oct 9, 2011, at 10:23 AM, Jeffrey Massung wrote:

> Is it possible to trap these so LispWorks doesn't just quit? I found a ..ps file talking about doing this, but it was from 2004 using a very old LW FFI and a foreign-callable that doesn't even match the current define-foreign-callable.
> 
> Thanks for any thoughts.
> 
> Jeff M.


Updated at: 2020-12-10 08:37 UTC