From: vsr Date: Tue, 18 Nov 2008 10:01:41 +0000 (+0000) Subject: Fix problem with notifd process killing on SALOME session shutdowning. X-Git-Tag: V5_1_0rc2~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d907233c7d160417fc65aa9d5e8e0b60b26002ad;p=modules%2Fkernel.git Fix problem with notifd process killing on SALOME session shutdowning. --- diff --git a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx index ef14d7cc9..a909068f7 100644 --- a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx +++ b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx @@ -495,7 +495,11 @@ void SALOME_LifeCycleCORBA::killOmniNames() + portNumber + string("\" | awk '{cmd=sprintf(\"kill -9 %s\",$1); system(cmd)}'" ); MESSAGE(cmd); - system ( cmd.c_str() ); + try { + system ( cmd.c_str() ); + } + catch ( ... ) { + } } // NPAL 18309 (Kill Notifd) @@ -509,9 +513,9 @@ void SALOME_LifeCycleCORBA::killOmniNames() cmd += string("m={}; "); cmd += string("[ m.update(i) for i in pids ]; "); cmd += string("pids=filter(lambda a: 'notifd' in m[a], m.keys()); "); - cmd += string("[ os.kill(pid, 9) for pid in pids ]; "); + cmd += string("[ os.system('kill -9 %d'%pid) for pid in pids ]; "); cmd += string("os.remove(filedict); "); - cmd = string("python -c \"") + cmd +"\" > /dev/null"; + cmd = string("python -c \"") + cmd +"\" >& /dev/null"; MESSAGE(cmd); system( cmd.c_str() ); }