-1 means poll() had an error.  I'm pretty sure the only error that's recoverable is EAGAIN.  If it's anything else, I think we need to print the error and abort().

I had something similar over here --
https://github.com/facebook/xctool/blob/master/xctool/xctool/TaskUtil.m#L115