Exit when a signal is recieved

Сергей Коныгин <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
Hello!

My console program must exits normally when a signal SIGINT is received 
(OnExit and the global objects destructors should run). How can I correctly 
send an exit event from OnSignal function to the application?

void OnSignal( int sig )
{
????????
}

class MyApp : public wxAppConsole
{
bool OnInit()
{
SetSignalHandler( wxSIGINT, OnSignal );
... 
}
int OnExit()
{
}
};

-- 
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
--- 
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wx-users/33a19fcb-b547-4803-92f7-15e12b6574f3n%40googlegroups.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.