Fix wait/post for unix