Questions tagged [exit-handler]

12 questions
9
votes
2 answers

How do I write an exit handler for an F# application?

Subject says it all. I want some code to run if my application is terminated by, say, ^C.
Paul Steckler
  • 617
  • 5
  • 19
5
votes
1 answer

Does Application.ApplicationExit event work to be notified of exit in non-Winforms apps?

Our code library needs to be notified when the application is exiting. So we have subscribed to the System.Window.Forms.Application.ApplicationExit event. This works nicely for Winforms apps, but does it also work for other types of applications…
Rob Parker
  • 4,078
  • 1
  • 25
  • 26
2
votes
0 answers

When can DECLARE EXIT HANDLER FOR SQLEXCEPTION ROLLBACK have an effect?

DECLARE EXIT HANDLER FOR SQLEXCEPTION ROLLBACK is "supposed" to be used before a transaction, to explicitly set the value on failure. However, the documentation states that this is more or less the default behavior anyway? If a condition occurs for…
djechlin
  • 59,258
  • 35
  • 162
  • 290
1
vote
3 answers

Shut down a ATL application cleanly

I have developed a console ATL application and want to trap the close?, exit?, terminate? event so that I can close log files and perform a general clean-up on exit. How can I trap the 'terminate' event that would result from someone ending the .exe…
user59725
  • 11
  • 4
0
votes
0 answers

Android application returns to main activity instead of exiting

I created an exit screen for an android application - when the user clicks exit, it is supposed to show the exit screen for 2sec then close the app. This works in android 10 & pixel emulator, but when run on a real device the app comes back to the…
0
votes
0 answers

Kubeflow pipeline Exit Handler with multiple components/steps

I'm trying to configure an Exit Handler in Kubeflow Pipelines to use two different components that perform two distinct actions at the end of the pipeline run. I've tried to do it in so many different ways, mostly using trial and error, as I've not…
Albert
  • 1
0
votes
0 answers

Is there a way to handle the error handling scenario in IBM DB2 for below concept

A cursor in a procedure selects the SQL queries, runs them, and logs the results in a table. Currently, if the SQL query contains any errors, it will exit the handler and insert the log into the log table. However, I'm attempting to concatenate the…
MRR
  • 83
  • 3
  • 9
0
votes
1 answer

How to run an existing Argo Workflow after completion of another Argo workflow?

So I have a Argo workflow_B that needs to run after completion of Argo workflow_A which is used by another team. Both workflows already exist I just want to chain them together. How can I achieve that? Is it possible to do such thing using…
0
votes
0 answers

In browser environments how do I detect that all JavaScript code has terminated?

For testing purposes I want to detect the 'end' of a script, i.e. when no function is running anymore and no asynchronous tasks are on the queue. In Node.js I can simply add an exit handler: process.on('exit', () = {do_stuff();}); which will fire…
frans
  • 8,868
  • 11
  • 58
  • 132
0
votes
0 answers

Exit Handler Not Activating: Python

For some reason, when my program is closing, the exit handler is not being activated. Therefore, my program is not logging the date/time of file close or hitting enter twice (to prepare the file for the program's next run, keep things neat) as…
0
votes
0 answers

How to identify system shut down or reboot events in exit handler?

I have the following code to identify whether a process has exited or not. When it exits I am creating a notification in my application. Process[] processes = RunningInstancesByName("MyService"); while (processes.Length <= 0) { …
AnOldSoul
  • 4,017
  • 12
  • 57
  • 118
0
votes
1 answer

Exit handler in expect script not removing file

I'm having some trouble with an expect script I am writing. The goal of the script is to SSH to a partner and obtain network configuration information. That information is saved in a file and copied back to the local host for processing. The file is…
legendmac
  • 43
  • 2
  • 8