]> SALOME platform Git repositories - modules/yacs.git/commitdiff
Salome HOME
sigaction was called with a mask of signals (SIGINT | SIGUSR1)
authorrahuel <rahuel@opencascade.com>
Thu, 3 Feb 2005 12:50:57 +0000 (12:50 +0000)
committerrahuel <rahuel@opencascade.com>
Thu, 3 Feb 2005 12:50:57 +0000 (12:50 +0000)
But sigaction must be called with only one signal code.
So there is one call for SIGINT and an other one for SIGUSR1

src/Container/Container_i.cxx

index 649a29b5e9cb6a9d47f1ff2c8275b84bc2926ffa..9144097567fd13f30d489d0bbe1570acc7834ba6 100644 (file)
@@ -282,13 +282,17 @@ void ActSigIntHandler() {
   struct sigaction SigIntAct ;
   SigIntAct.sa_sigaction = &SigIntHandler ;
   SigIntAct.sa_flags = SA_SIGINFO ;
-  if ( sigaction( SIGINT | SIGUSR1 , &SigIntAct, NULL ) ) {
+// DEBUG 03.02.2005 : the first parameter of sigaction is not a mask of signals (SIGINT | SIGUSR1) :
+// it must be only one signal ===> one call for SIGINT and an other one for SIGUSR1
+  if ( sigaction( SIGINT , &SigIntAct, NULL ) ) {
     perror("SALOME_Container main ") ;
     exit(0) ;
   }
-  else {
-    INFOS(pthread_self() << "SigIntHandler activated") ;
+  if ( sigaction( SIGUSR1 , &SigIntAct, NULL ) ) {
+    perror("SALOME_Container main ") ;
+    exit(0) ;
   }
+  INFOS(pthread_self() << "SigIntHandler activated") ;
 }
 
 void SetCpuUsed() ;