Problem: zyr_stop does not wait for signal

Solution: make it wait properly.
Merge pull request #294 from hintjens/master

Problem: zyr_stop does not wait for signal