• Dan Winship's avatar
    GUnixInput/OutputStream: fix blocking methods to always block · 74dad004
    Dan Winship authored
    Previously, if you created a GUnixInputStream or GUnixOutputStream
    from a non-blocking file descriptor, it might sometimes return
    G_IO_ERROR_WOULD_BLOCK from g_input_stream_read/g_output_stream_write,
    which is wrong. Fix that. (Use the GPollableInput/OutputStream methods
    if you want non-blocking I/O.)
    
    Also, add a test for this to gio/tests/unix-streams.
    
    Also, fix the GError messages to say "Error reading from file
    descriptor", etc instead of "Error reading from unix" (which was
    presumably from a bad search and replace job).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=626866
    74dad004
unix-streams.c 6.84 KB