grierj/salt — comment on commit fdfce1b3c3f1c2e7177dcca1133bae92e66c5599
File: salt/master.py line 187
By grierj:

I raised the SystemExit because it was already there for the SIGINT and I didn't want to risk mucking up any other routines that might be looking for it. I wrote this code a while ago and didn't quite have my head wrapped around the full flow of the code. The finally is not-needed... it's an artifact from just hoping that I could get away with raising SystemExit and having the child processes exit from that. Didn't work... I forgot to clean it up before submitting the pull request. Sorry about that.

As for the return code. It doesn't personally bother me, since runit/daemontools just blindly restarts processes that end no matter what. I could see other people worrying about it though.

I could extend SystemExit to a CleanExit exception and catch that further up the stack (probably the __init__.py file in a try/except around master.start()?) and turn that into a sys.exit(0) to keep things clean. Thoughts on that?