InterprocessConnection "smart" retries?


I noticed that when using named pipes between 2 processes, if one of the processes dies unexpectedly, the read and write methods of the surviving process hang indefinitely:

[code]int write (const char* sourceBuffer, int numBytesToWrite, int timeOutMilliseconds)
int bytesWritten = -1;

    if (pipeOut == -1)
        pipeOut = ::open ((createdPipe ? pipeOutName
                                       : pipeInName).toUTF8(), O_WRONLY);

        if (pipeOut == -1)
            return -1;

I’m not a pipe expert but wouldn’t it be possible to call ::open with its non blocking option and add a retry mechanism with a randomly increasing wait between iterations? Or does it bring other problems because it’s not how named pipes are supposed to be used?