if ipfd[0]==-1 and ipfd[1] is bigger than 0 , the check condition later will fail.