[Quickfix-developers] ctrl-c , sleep and a clean shutdown
Brought to you by:
orenmnero
|
From: Clark S. <cla...@ya...> - 2004-06-05 01:07:02
|
In the file executor.cpp I see the following code:
void wait()
{
std::cout << "Type Ctrl-C to quit" << std::endl;
while(true)
{
FIX::process_sleep(1);
}
}
and this is called from
acceptor.start();
wait();
acceptor.stop();
return 0;
acceptor.stop(), must be the function that cleans up before a shutdown.
I don't understand how ctrl-c causes wait to return. I went through the code for process_sleep, and no call to signal, is made. Nor is there a call to signal anywhere else. It looks to me that typing ctrl-c would cause the program to shutdown immediately, and that acceptor.stop, would never be called.
So my question is, how can ctrl-c cause this program to shutdown in a clean way?
Thanks in Advance,
Clark Sims
---------------------------------
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger |