shutdown-hook

java: useful example of a shutdown hook?

I'm trying to make sure my Java application takes reasonable steps to be robust, and part of that involves shutting down gracefully. I am reading about shutdown hooks and I don't actually get how to make use of them in practice. Is there a practical example out there? Let's say I had a really simple application like this one below, whi...

Flex ExternalInterface not firing in Safari (works everwhere else!)

Hi all, I know there have been other questions on getting JavaScript / Flex ExternalInterface to play nicely, but I've what I think is a weird one. It works perfectly in every browser except Safari (on a Mac). Chrome, IE, Firefox - all ok, but Safari, nope it just wont fire. I've copied my code below, can anyone see why it doesn't work i...

Shutdown Hook with windows-scripting-host

Hi, The following link (http://www.bigresource.com/Tracker/Track-vb-MjQNB6lXIl/) discusses how a shutdown hook can be implemented using VB. Now my question is, can something like that be done using Windows Script Host/windows scripting host ? I would very much appreciate your input; maybe include some code snippets. Thanks, Klaus. ...

register php shutdown function to fire when a script is killed from the command line?

Is it possible to invoke a function when a cron process is killed from the command line (via ctrl+c) or with the kill command? I have tried register_shutdown_function(), but it doesn't seen to be invoked when the script is killed, but does get invoked when the script ends normally. I am trying to log the result to a file and update a d...