Skip to content
This repository has been archived by the owner on Apr 30, 2022. It is now read-only.

Commit

Permalink
Warn if SIGHUP and/or SIGINFO not supported, rather than failing to s…
Browse files Browse the repository at this point in the history
…tart
  • Loading branch information
pauln committed Mar 27, 2012
1 parent 5ddb1d7 commit a021210
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions mvhp.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,17 @@ def terminate(signum, frame):
print "Invalid configuration file:"
print e
sys.exit(1)
signal.signal(signal.SIGHUP, refresh)
signal.signal(signal.SIGINFO, info)

try:
signal.signal(signal.SIGHUP, refresh)
except Exception as e:
print "NOTICE: SIGHUP not supported on your OS"

try:
signal.signal(signal.SIGINFO, info)
except Exception as e:
print "NOTICE: SIGINFO not supported on your OS"

signal.signal(signal.SIGTERM, terminate)
signal.signal(signal.SIGINT, terminate)
server = Listener('0.0.0.0', 25565)
Expand Down

0 comments on commit a021210

Please sign in to comment.