control-port-filter-python should exit non-zero if setting up listener fails

Information

ID: 221
PHID: PHID-TASK-ct3r7yyp3pcdy6ox3o3f
Author: Patrick
Status at Migration Time: resolved
Priority at Migration Time: Normal

Description

When it’s already running as okay… And you run…

sudo -u debian-tor /usr/lib/control-port-filter-python/cpfp.py

Then it fails to start up (as per log) and exits 0. This is a bug.

Current:

  except IOError as e:
    logger.critical('Server error %s' % (e))

Proposed:

  except IOError as e:
    logger.critical('Server error %s' % (e))
    logger.critical('Exiting.')
    sys.exit(1)

That would be more correct, have helped what I reported in T218 a bit, help sysvinit / systemd.

Comments


Patrick

2015-03-06 19:03:36 UTC