From: vsr Date: Mon, 17 Nov 2008 14:27:20 +0000 (+0000) Subject: Fix problem with notifd process killing on SALOME session shutdowning. X-Git-Tag: V4_1_4~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f732cb7f53b1e3b60e9d5c572330300e99c66546;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() ); }