#!/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
# 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
class Server:
"""Generic class for CORBA server launch"""
-
+
server_launch_mode = "daemon"
def initArgs(self):
#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
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)