Handle signals (HUP, USR1, INT, TERM) properly when n_workers = 0

GitHub: fix #53