g_io_unix_read/g_io_unix_write



Hi everyone,

shouldn't EINTR be mapped to G_IO_ERROR_AGAIN in g_io_unix_read?

http://www.opengroup.org/onlinepubs/7908799/xsh/read.html

says, that:

If a read() is interrupted by a signal before it reads any data, it will
return -1 with errno set to [EINTR]. If a read() is interrupted by a signal
after it has successfully read some data, it will return the number of bytes
read. 

That means, that you should just read again on EINTR, which is, what
G_IO_ERROR_AGAIN is all about.

The same applies to g_io_unix_write and possibly the g_io_win32_... functions.

Any opinions?

BTW.: Any chances, we add a g_io_channel_writev function similarto
      writev(2)?

Bye,
Sebastian
-- 
Sebastian Wilhelmi                   |            här ovanför alla molnen
mailto:wilhelmi@ira.uka.de           |     är himmlen så förunderligt blå
http://goethe.ira.uka.de/~wilhelmi   |



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]