Are you preventing some infinite loop here? 

Testing on a non-posix platform is probably a good idea.