void ClientMain::registerSignalHandler (  )  [private]

Definition at line 503 of file ClientMain.cpp.

00503                                                {
00504                 // TODO: register the static handler and find some way for it to
00505                 // find out which object needs the handler now...
00506                 
00507                 // idea:
00508                 // there could be a static vector that saves which client currently
00509                 // needs signal handling.
00510                 // on registring the client is added to the vector and the static function
00511                 // is registred
00512                 
00513                 ClientMain::lockHandledInstances();
00514                 // add this instance to the handled ones, if not already included...
00515                 if (ClientMain::handledInstancesPosition(this) < 0) {
00516                         // enter current instance to handled ones
00517                         handledInstances.push_back(this);
00518                         // register the signal handler for the main thread
00519                         signal(SIGINT, ClientMain::staticSignalHandlerWrapper);
00520                         signal(SIGTERM, ClientMain::staticSignalHandlerWrapper);
00521                         signal(SIGKILL, ClientMain::staticSignalHandlerWrapper);
00522                 }
00523                 ClientMain::unlockHandledInstances();
00524         }


Generated on Wed Jun 25 14:47:08 2008 for keyvil by  doxygen 1.5.1