rewrote with minor adjustments
Merge branch 'master' of https://github.com/mks65-dw/semaphone