catch an oserror when wait() gets interrupt by a signal
Merge pull request #17 from tarekziade/oserr

catch an oserror when wait() gets interrupt by a signal