pass existing flags to fcntl (as well as O_NONBLOCK)
use libev instead of pthread
update README
stop outputting color escape sequence unnecessarily
set exit status of child process as the exit status of itself
collect similar functions into one function
output handling is also done in event loop