"""modify script, copy files to remote computer and return lists of copied files"""
namescript=os.path.basename(script)
- logname=os.getenv("LOGNAME",user)
+ import getpass
+ logname = getpass.getuser()
tmp_script="/tmp/%s_%s_%s" % (logname,os.getpid(),namescript)
fscript=open(script)
script_text=fscript.read()
lcc.shutdownServers()
# give some time to shutdown to complete
time.sleep(1)
- # shutdown omniNames and notifd
+ # shutdown omniNames
if cleanup:
lcc.killOmniNames()
time.sleep(1)
appliCleanOmniOrbConfig(port)
pass
-def killNotifdAndClean(port):
+def cleanApplication(port):
"""
- Kill notifd daemon and clean application running on the specified port.
+ Clean application running on the specified port.
Parameters:
- port - port number
"""
try:
filedict=getPiDict(port)
- with open(filedict, 'r') as f:
- pids=pickle.load(f)
- for d in pids:
- for pid,process in d.items():
- if 'notifd' in process:
- cmd='kill -9 %d'% pid
- os.system(cmd)
os.remove(filedict)
except:
#import traceback
line = ADD_TO_PREFIX + k + ": " + value
# Update list of variable names
# :TODO: define excludeBlock variable (similar to exclude) and provide method to extend it
- if line.startswith("LOGNAME="):
- return "\n"
if "cleandup()" in line:
print "WARNING: parseConfigFile.py: skip cleandup and look for '# PRODUCT environment'"
while True:
self.CMD=self.SCMD1 + ['"' + string.join(cata_path,'"::"') + '"'] + self.SCMD2
else:
self.CMD=self.SCMD1 + self.SCMD2
-
-class NotifyServer(Server):
- def __init__(self,args,modules_root_dir):
- self.args=args
- self.initArgs()
- self.modules_root_dir=modules_root_dir
- myLogName = os.environ["LOGNAME"]
- self.CMD=['notifd','-c',
- self.modules_root_dir["KERNEL"] +'/share/salome/resources/kernel/channel.cfg',
- '-DFactoryIORFileName=/tmp/'+myLogName+'_rdifact.ior',
- '-DChannelIORFileName=/tmp/'+myLogName+'_rdichan.ior',
- '-DReportLogFile=/tmp/'+myLogName+'_notifd.report',
- '-DDebugLogFile=/tmp/'+myLogName+'_notifd.debug',
- ]
-
#
# -----------------------------------------------------------------------------
myServer.run()
clt.waitLogger("Logger")
- # Notify Server launch
- #
-
- if sys.platform != "win32":
- if verbose(): print "Notify Server to launch"
-
- myServer=NotifyServer(args,modules_root_dir)
- myServer.run()
-
# set siman python path before the session server launching to import scripts inside python console
if simanStudyName(args):
# MPV: use os.environ here because session server is launched in separated process and sys.path is missed in this case
class Server:
"""Generic class for CORBA server launch"""
-
+
server_launch_mode = "daemon"
def initArgs(self):
try:
os.execvp(args[0], args)
except OSError, e:
- if args[0] != "notifd":
- print >>sys.stderr, "(%s) launch failed: %d (%s)" % (args[0],e.errno, e.strerror)
- pass
+ print >>sys.stderr, "(%s) launch failed: %d (%s)" % (args[0],e.errno, e.strerror)
os._exit(127)
}
//=============================================================================
-/*! \brief shutdown all the SALOME servers except SALOME_Session_Server, omniNames and notifd
+/*! \brief shutdown all the SALOME servers except SALOME_Session_Server and omniNames
*/
//=============================================================================
}
//=============================================================================
-/*! \brief shutdown omniNames and notifd
+/*! \brief shutdown omniNames
*/
//=============================================================================
#endif
}
- // NPAL 18309 (Kill Notifd)
-
std::string python_exe;
python_exe = std::string("python");
if ( !portNumber.empty() )
{
- std::string cmd = ("from killSalomeWithPort import killNotifdAndClean; ");
- cmd += std::string("killNotifdAndClean(") + portNumber + "); ";
+ std::string cmd = ("from killSalomeWithPort import cleanApplication; ");
+ cmd += std::string("cleanApplication(") + portNumber + "); ";
cmd = python_exe + std::string(" -c \"") + cmd +"\" > /dev/null 2> /dev/null";
MESSAGE(cmd);
system( cmd.c_str() );
myServer.run()
clt.waitLogger("Logger")
-# launch notify server
-
-myServer=runSalome.NotifyServer(args,modules_root_dir)
-myServer.run()
-
# launch registry server
myServer=runSalome.RegistryServer(args)
myServer.run()
clt.waitLogger("Logger")
-# launch notify server
-
-myServer=runSalome.NotifyServer(args,modules_root_dir)
-myServer.run()
-
# launch registry server
myServer=runSalome.RegistryServer(args)
myServer.run()
clt.waitLogger("Logger")
-# launch notify server
-
-myServer=runSalome.NotifyServer(args,modules_root_dir)
-myServer.run()
-
# launch registry server
myServer=runSalome.RegistryServer(args)
launcher = clt.waitNS("/SalomeLauncher",Engines.SalomeLauncher)
launcher.Shutdown()
-# kill Test process
+# kill Test process
TestKiller.killProcess(runSalome.process_id)