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

all in title