mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Fixed an error in Windows version that put pid files in the wrong location (how come a Windows user didn't notice this one before?)
This commit is contained in:
parent
94b8532f59
commit
1c298951d6
2 changed files with 6 additions and 8 deletions
|
|
@ -131,10 +131,9 @@ class Portal(object):
|
|||
"""
|
||||
if mode is None:
|
||||
return
|
||||
f = open(PORTAL_RESTART, 'w')
|
||||
print "writing mode=%(mode)s to %(portal_restart)s" % {'mode': mode, 'portal_restart': PORTAL_RESTART}
|
||||
f.write(str(mode))
|
||||
f.close()
|
||||
with open(PORTAL_RESTART, 'w') as f:
|
||||
print "writing mode=%(mode)s to %(portal_restart)s" % {'mode': mode, 'portal_restart': PORTAL_RESTART}
|
||||
f.write(str(mode))
|
||||
|
||||
def shutdown(self, restart=None, _reactor_stopping=False):
|
||||
"""
|
||||
|
|
@ -330,6 +329,5 @@ print '-' * 50 # end of terminal output
|
|||
|
||||
if os.name == 'nt':
|
||||
# Windows only: Set PID file manually
|
||||
f = open(os.path.join(settings.GAME_DIR, 'portal.pid'), 'w')
|
||||
f.write(str(os.getpid()))
|
||||
f.close()
|
||||
with open(PORTAL_PIDFILE, 'w') as f:
|
||||
f.write(str(os.getpid()))
|
||||
|
|
|
|||
|
|
@ -535,6 +535,6 @@ ServerConfig.objects.conf("server_starting_mode", delete=True)
|
|||
|
||||
if os.name == 'nt':
|
||||
# Windows only: Set PID file manually
|
||||
with open(os.path.join(settings.GAME_DIR, 'server.pid'), 'w') as f:
|
||||
with open(SERVER_PIDFILE, 'w') as f:
|
||||
f.write(str(os.getpid()))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue