PDA

View Full Version : Control-C to interrupt is not working



rburge
17th April 2006, 19:01
My program will not respond to a ctrl-c interrupt to terminate it's execution. I have my guesses but not really sure why. The program has no GUI but it utilizes signals/slots so I have a QApplication object to get to a "main loop." I have different app which does put up a "main window" and it responds just fine to the ctrl-C. Is the lack of a window the problem?

Here is the main:


int main (int argc, char *argv[])
{
QApplication a(argc,argv);
ProcessMsgOperation pmo;
return a.exec;
}

The ProcessMsgOperation sets up some socket connections and a timer. Either when a socket msg or a timer event occurs it reads from a database and then posts a message to a socket.

Thanks,
Rick

Linux or HPUX 11.11
QT3.3.4
Threads

rburge
17th April 2006, 21:18
I have found out that the issue is really the connection to the Oracle DB. I'm using the qt db object and apparently as long as there is an open connection then SIGINT is ignored. This is not strctly speaking a qt issue, from what I can tell this is the way Oracle intends it to work. Based on what I have read it looks like you can register a signal handler with Oracle to handler the SIGINT.

Is there anyway to do this via some qt object?

Rick