From: vsr Date: Tue, 18 Aug 2009 10:36:56 +0000 (+0000) Subject: Issue 0020448: Put the omniNames log files in a subdir X-Git-Tag: V5_1_3rc1~88 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fe6007b9d04d64a354c5a2e461adae1bd85e8e53;p=modules%2Fkernel.git Issue 0020448: Put the omniNames log files in a subdir --- diff --git a/bin/nameserver.py b/bin/nameserver.py index 32fa88627..e4ae95334 100755 --- a/bin/nameserver.py +++ b/bin/nameserver.py @@ -63,14 +63,6 @@ class NamingServer(Server): #print "Can't create " + upath pass - #os.system("touch " + upath + "/dummy") - for fname in os.listdir(upath): - try: - if not fname.startswith("."): os.remove(upath + "/" + fname) - except: - pass - #os.system("rm -f " + upath + "/omninames* " + upath + "/dummy " + upath + "/*.log") - if verbose(): print "Name Service... ", #hname=os.environ["HOST"] #commands.getoutput("hostname") if sys.platform == "win32": @@ -89,6 +81,27 @@ class NamingServer(Server): #aPort=(ss.join().split(':'))[2]; #aPort=re.findall("\d+", ss[0])[0] + # \begin{E.A.} + # put the log files of omniNames in different directory with port reference, + # it is cleaner on linux and it is a fix for salome since it is impossible to + # remove the log files if the corresponding omniNames has not been killed. + # \end{E.A.} + + upath += "/omniNames_%s"%(aPort) + try: + os.mkdir(upath) + except: + #print "Can't create " + upath + pass + + #os.system("touch " + upath + "/dummy") + for fname in os.listdir(upath): + try: + os.remove(upath + "/" + fname) + except: + pass + #os.system("rm -f " + upath + "/omninames* " + upath + "/dummy " + upath + "/*.log") + #aSedCommand="s/.*NameService=corbaname::" + hname + ":\([[:digit:]]*\)/\1/" #print "sed command = ", aSedCommand #aPort = commands.getoutput("sed -e\"" + aSedCommand + "\"" + os.environ["OMNIORB_CONFIG"])