bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-apl] Request: Callback when GNU APL shuts down


From: Elias Mårtenson
Subject: [Bug-apl] Request: Callback when GNU APL shuts down
Date: Fri, 24 Jan 2014 11:22:04 +0800

Is there a "correct" way to get informed when the interpreter is shutting down? In my case, I need to do some cleanup (in particular, delete the Unix domain socket file) when the interpreter exits.

One hypothetical implementation would involve something like the following function being exposed to plugins:

void register_shutdown_callback( void (*callback)(Type type) );

I could then call this function to register a function that is called whenever the interpreter is about to be stopped. I envision the type argument to inform me as to the type of shutdown (by a INT or HUP signal, a call to )OFF, or a crash, for example).

Would this be possible?

Regards,
Elias

reply via email to

[Prev in Thread] Current Thread [Next in Thread]