refactoring handypipefds without processing broken fds