Similar to the fix introduced by 4d6a8663fa, it's necessary to set one end of the file_pipe as non-blocking temporarily while opening the other end to avoid it blocking unexpectedily.
4d6a8663fa