Skip to content

Commit

Permalink
fixed problem starting CM on windows with stale pidfile, #549
Browse files Browse the repository at this point in the history
  • Loading branch information
devsnd committed Apr 20, 2015
1 parent 3e5d8d7 commit 5a0d4a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cherrymusicserver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,10 @@ def create_pid_file(cls):
if pathprovider.pidFileExists():
with open(pathprovider.pidFile(), 'r') as pidfile:
try:
os.getpgid(int(pidfile.read()))
if not sys.platform.startswith('win'):
# this call is only available on unix systems and throws
# an OSError if the process does not exist.
os.getpgid(int(pidfile.read()))
sys.exit(_("""============================================
Process id file %s already exists.
I've you are sure that cherrymusic is not running, you can delete this file and restart cherrymusic.
Expand Down

0 comments on commit 5a0d4a6

Please sign in to comment.