View Single Post
Old Dec 4th, 2004, 6:05 AM   #1
RoilO
Newbie
 
Join Date: Nov 2004
Posts: 5
Rep Power: 0 RoilO is on a distinguished road
Hi,
I'm trying to disable/ignore the ctrl+c in a c++ program.
I did it alot on UNIX but somehow it doens't work on WindowsXP,
I'm using the right function and typedefs but still....nothing.

I'm doing something like:

void someFunction(int sigNum){
signal (SIGINT,somefunction);
cout<<"eh eh, you can't use ctrl+c"<<endl;
}

main(){
signal(SIGINT,somefunction);

/*
Shell program
*/
}

I debuged the code and it looks like it's doesn't get into the someFunction at all and terminates and program as if I didn't use the signal function.

Any ideas?
thanks a lot.
RoilO is offline   Reply With Quote