Fixed sleep on unix. Fixed semaphore_nostarve