From ef3f2306f6e4f3aaeccd28c8663bf3526d69673a Mon Sep 17 00:00:00 2001 From: ana Date: Fri, 6 Dec 2013 10:22:16 +0000 Subject: [PATCH] Porting on WIN32/WIN64 --- src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx index 13634f498..ae0520f52 100644 --- a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx +++ b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx @@ -612,11 +612,21 @@ void SALOME_LifeCycleCORBA::killOmniNames() } // NPAL 18309 (Kill Notifd) + + std::string python_exe; +#ifdef WIN32 + #ifdef _DEBUG_ + python_exe = std::string("python_d"); + #endif +#else + python_exe = std::string("python"); +#endif + if ( !portNumber.empty() ) { std::string cmd = ("from killSalomeWithPort import killNotifdAndClean; "); cmd += std::string("killNotifdAndClean(") + portNumber + "); "; - cmd = std::string("python -c \"") + cmd +"\" > /dev/null 2> /dev/null"; + cmd = python_exe + std::string(" -c \"") + cmd; // +"\" > /dev/null 2> /dev/null"; MESSAGE(cmd); system( cmd.c_str() ); } @@ -627,7 +637,7 @@ void SALOME_LifeCycleCORBA::killOmniNames() { std::string cmd = ("from PortManager import releasePort; "); cmd += std::string("releasePort(") + portNumber + "); "; - cmd = std::string("python -c \"") + cmd +"\" > /dev/null 2> /dev/null"; + cmd = python_exe + std::string(" -c \"") + cmd +"\" > /dev/null 2> /dev/null"; MESSAGE(cmd); system( cmd.c_str() ); } -- 2.39.2