catch EINTR when read() from pipe