Salome HOME
Merge branch 'master' of https://git.salome-platform.org/git/modules/kernel
[modules/kernel.git] / bin / server.py
index 8721d096fe7c97166f14870dd31b631cf4a29abe..c01e52789998ca5c75a4e718c5621f85c85526f2 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -8,7 +8,7 @@
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -33,7 +33,7 @@ process_id = {}
 
 class Server:
     """Generic class for CORBA server launch"""
-    
+
     server_launch_mode = "daemon"
 
     def initArgs(self):
@@ -70,11 +70,7 @@ class Server:
         #print "command = ", command
         if sys.platform == "win32":
           import win32pm
-          #cmd_str = "\"" + string.join(command, " ") + "\""
-          #print cmd_str
-          #pid = win32pm.spawnpid( cmd_str )
-          pid = win32pm.spawnpid( string.join(command, " "), '-nc' )
-          #pid = win32pm.spawnpid( string.join(command, " ") )
+          pid = win32pm.spawnpid( command, '-nc' )
         elif Server.server_launch_mode == "fork":
           pid = os.spawnvp(os.P_NOWAIT, command[0], command)
         else: # Server launch mode is daemon
@@ -137,7 +133,5 @@ class Server:
         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)